Skip to content

Tools: x-mcp-header annotation tooling + -32602 unknown-tool rendering #1632

Description

@cliffhall

Stack: SDK V2 + New Spec — 9 of 10 (tab era-fork; needs era model from card 3).

Add x-mcp-header annotation tooling to the Tools tab and adjust result rendering for the SDK v2 unknown-tool behavior.

Scope

  • Parse/validate x-mcp-header annotations on tool inputSchema properties (primitive types only — string/integer/boolean, no number; statically reachable via plain properties chains — no $ref/oneOf/items/conditionals).
  • Visibly flag tools excluded for invalid annotations. The spec makes exclusion mandatory — on Streamable HTTP a violating annotation invalidates the whole tool and clients MUST drop it from tools/list. A debugging tool should show why a tool vanished, not just silently omit it.
  • Show which args will be mirrored to Mcp-Param-{Name} headers (ties into card 5's Network display).
  • Unknown-tool calls now reject with -32602 (SDK v2) instead of returning an isError result — adjust the Tools result rendering accordingly.

Key files

clients/web/src/components/screens/ToolsScreen/*, groups/ToolDetailPanel/*, groups/ToolResultPanel/*, core/json/* (schema/param conversion), core/mcp/inspectorClient.ts.

Acceptance

  • Tools with invalid x-mcp-header annotations are shown as excluded, with the reason.
  • Mirrored args are indicated; unknown-tool rejection renders as an error (not isError).
  • npm run ci green.

Ref: specification/v2_new_spec_impact.md §4.1, §8.1(unknown tool), §9.3(Tools).

Metadata

Metadata

Assignees

Labels

v2Issues and PRs for v2

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions