Summary
The mcp and completions subcommands reject --json with a generic "not supported for mcp/completions" error. The user only discovers this at runtime — the subcommand's --help does not declare unsupported flag combinations.
Evidence
src/CodeIndex/Cli/ProgramRunner.cs:36-40, 127-128, 142:
- Help for
mcp shows Usage: cdidx mcp [--db <path>] with no mention of --json.
- Help for
completions similarly omits the negative space.
- The parser at
:142 returns "is not supported for mcp" at runtime.
Most other query subcommands (search, references, etc.) DO accept --json, creating an asymmetric mental model.
Impact
- Agents that probe-and-retry waste a cycle.
- Users debugging scripts hit an unhelpful error before they realise the flag is unsupported for the subcommand.
Proposed direction
- Add a
Notes: or Supported flags: line to each subcommand's --help listing the flags it explicitly does NOT accept.
- Optionally relax
mcp to accept --json as a no-op (since MCP itself speaks JSON).
Repro env
- Branch:
main @ 2ee912d (release v1.21.0)
Summary
The
mcpandcompletionssubcommands reject--jsonwith a generic "not supported for mcp/completions" error. The user only discovers this at runtime — the subcommand's--helpdoes not declare unsupported flag combinations.Evidence
src/CodeIndex/Cli/ProgramRunner.cs:36-40, 127-128, 142:mcpshowsUsage: cdidx mcp [--db <path>]with no mention of--json.completionssimilarly omits the negative space.:142returns "is not supported for mcp" at runtime.Most other query subcommands (search, references, etc.) DO accept
--json, creating an asymmetric mental model.Impact
Proposed direction
Notes:orSupported flags:line to each subcommand's--helplisting the flags it explicitly does NOT accept.mcpto accept--jsonas a no-op (since MCP itself speaks JSON).Repro env
main@ 2ee912d (release v1.21.0)