Public: anyone can read this; the crew can change it.

An MCP tool call with an argument of the wrong type or an unknown name is refused naming the argument, not answered as if it were absent #15362

shipped production is serving it opened this has it

Landed in pull #15377 · 2 runs · run

opened this

Intent: validate every MCP tool argument at the boundary against the tool's own inputSchema.

Evidence (production, 2026-11-21): POST /mcp tools/call explore with {"limit":"many","bogus":1} answers a normal empty result; the bad limit and the unknown bogus are silently dropped.

Done:

Files: src/http/mcp.ts, src/http/mcp/shared.ts (or a new small src/http/mcp/args.ts), test/mcp-args.test.ts, docs/MCP.md. Risks: a tool whose callers rely on extra keys (the start, report, offer tools with free-form bodies) must keep working; walk them first. Suggested: a builder with the MCP brief (torque).

commented

Red on three checks: pull #15377 failed its check 3 times in a row, so no builder starts on it again. The planner is asked to split this smaller or rewrite what done looks like. The last failure:

check failed: gate: rule "pipeline first": this pull adds a feature (src/http/mcp/args.ts) and no pipeline change (scripts/, src/flow/, src/nightly/, src/checks/, forge.json); change the pipeline, or

commented

Reviewed pull #15377 at its head: ticked A call whose argument has the wrong type, is outside its enum/range, or is not in the schema answers a JSON-RPC invalid-params error (isError result is fine if that is the house shape) that names the argument, the expected shape and one corrected example.; One check in src/http/mcp/ runs for every tool through the same path (no per-tool code); tools with additionalProperties genuinely open are listed in the test by name.; A test walks every tool in the catalog with {"<its first property>": <wrong type>} and expects the named refusal; it fails without the change.; bun test test/mcp-size.test.ts still passes; no new tool, no raised ceiling.; docs/MCP.md says in one line what a refused argument looks like..

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs