Skip to content

feat(cli, config): Accept comma-separated tool names - #1066

Merged
JeanMertz merged 2 commits into
mainfrom
easy-add-tools
Sep 5, 2026
Merged

feat(cli, config): Accept comma-separated tool names#1066
JeanMertz merged 2 commits into
mainfrom
easy-add-tools

Conversation

@JeanMertz

Copy link
Copy Markdown
Collaborator

--tool and --no-tool take several tool names in one flag, separated by commas, so a query that opens up three tools no longer needs three flags:

jp query -t cargo_check,cargo_test,fs_read_file "Does this compile?"

Space around a name is ignored, repeating the flag still works and composes with the comma form, and each name keeps its place in the left-to-right order that --no-tool --tool=write relies on. A bare --tool or --no-tool is unchanged: it still covers every configured tool.

A missing value is refused rather than guessed at, wherever a comma separates values. -t read,,write reports the stray comma instead of reading it as the bare flag and enabling everything, and a --cfg list does the same instead of quietly dropping the gap. Assigning nothing at all is untouched: conversation.labels.crate= still names no values and remains the way to clear a list, and a value that genuinely contains a comma is written with the JSON form, crate:="feat,exp".

The tool-use documentation is corrected alongside. It described --tool=false, --tool=true, and --tool=<name>, which are spellings of --tool-use and --no-tool-use; --tool=false asks for a tool named "false" and errors.

BREAKING CHANGE: A tool name cannot contain a comma

Configuring a tool whose name contains a comma is rejected when the configuration resolves, naming the offending key:

conversation.tools.read,write: a tool name cannot contain a comma,
because `--tool` and `--no-tool` read it as a separator between names

Rename the tool to clear the error.

`--tool` and `--no-tool` take several tool names in one flag, separated
by commas, so a query that opens up three tools no longer needs three
flags:

```sh
jp query -t cargo_check,cargo_test,fs_read_file "Does this compile?"
```

Space around a name is ignored, repeating the flag still works and
composes with the comma form, and each name keeps its place in the
left-to-right order that `--no-tool --tool=write` relies on. A bare
`--tool` or `--no-tool` is unchanged: it still covers every configured
tool.

A missing value is refused rather than guessed at, wherever a comma
separates values. `-t read,,write` reports the stray comma instead of
reading it as the bare flag and enabling everything, and a `--cfg` list
does the same instead of quietly dropping the gap. Assigning nothing at
all is untouched: `conversation.labels.crate=` still names no values and
remains the way to clear a list, and a value that genuinely contains a
comma is written with the JSON form, `crate:="feat,exp"`.

The tool-use documentation is corrected alongside. It described
`--tool=false`, `--tool=true`, and `--tool=<name>`, which are spellings
of `--tool-use` and `--no-tool-use`; `--tool=false` asks for a tool
named "false" and errors.

BREAKING CHANGE: A tool name cannot contain a comma

Configuring a tool whose name contains a comma is rejected when the
configuration resolves, naming the offending key:

    conversation.tools.read,write: a tool name cannot contain a comma,
    because `--tool` and `--no-tool` read it as a separator between names

Rename the tool to clear the error.

Signed-off-by: Jean Mertz <git@jeanmertz.com>
Signed-off-by: Jean Mertz <git@jeanmertz.com>
@JeanMertz
JeanMertz merged commit 8ac74fd into main Sep 5, 2026
21 checks passed
@JeanMertz
JeanMertz deleted the easy-add-tools branch September 5, 2026 21:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant