For OpenAPI-generated commands, the tool description is operation.summary ?? operation.description:
|
description: op.summary ?? op.description, |
which flows into tools/list via mcp?.description ?? entry.description:
|
description: mcp?.description ?? entry.description, |
When an operation has both, summary wins and description is discarded. Summaries are typically short labels ("List tokens") while descriptions carry the prose agents actually need: auth requirements, pagination semantics, parameter guidance, caveats. Specs that document operations well get the weakest tool descriptions.
Proposal
When both exist, concatenate them as the tool description:
Design constraint
CLI --help renders entry.description on a single line with no truncation (src/Help.ts), so concatenating at the command level would bloat help output. Two options:
- Keep the generated command's
description as the summary and populate its mcp.description with the concatenation. collectToolEntries already prefers mcp?.description, so the change is confined to Openapi.ts (plus GeneratedCommand gaining an mcp field).
- Concatenate
description itself and have help render only the first line.
Option 1 keeps CLI help short and only changes the MCP surface.
For OpenAPI-generated commands, the tool description is
operation.summary ?? operation.description:incur/src/Openapi.ts
Line 436 in 746840a
which flows into
tools/listviamcp?.description ?? entry.description:incur/src/Mcp.ts
Line 290 in 746840a
When an operation has both,
summarywins anddescriptionis discarded. Summaries are typically short labels ("List tokens") while descriptions carry the prose agents actually need: auth requirements, pagination semantics, parameter guidance, caveats. Specs that document operations well get the weakest tool descriptions.Proposal
When both exist, concatenate them as the tool description:
Design constraint
CLI
--helprendersentry.descriptionon a single line with no truncation (src/Help.ts), so concatenating at the command level would bloat help output. Two options:descriptionas the summary and populate itsmcp.descriptionwith the concatenation.collectToolEntriesalready prefersmcp?.description, so the change is confined toOpenapi.ts(plusGeneratedCommandgaining anmcpfield).descriptionitself and have help render only the first line.Option 1 keeps CLI help short and only changes the MCP surface.