Skip to content

MCP tool descriptions drop the OpenAPI operation description when a summary exists #185

Description

@jxom

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:

<summary>

<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:

  1. 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).
  2. Concatenate description itself and have help render only the first line.

Option 1 keeps CLI help short and only changes the MCP surface.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions