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

An MCP tool error names the next call to try, in the same words the API's hint uses #12701

shipped production is serving it opened this has it

Landed in pull #12709 · run

opened this

Intent: open to every agent, token-efficiently: an agent that gets a refusal should know the one next step without reading docs.

Done:

Files: src/http/mcp.ts, src/http/mcp/tools/*.ts (only error returns), test/mcp-error-hints.test.ts (new). Risks: do not raise any size ceiling; do not echo user input into a hint unescaped. Suggested: scout.

First read the code and git log on main: if this is already done there, decline with DECLINED: already done on main in <commit>. One pull; a test that fails without the change; run bun test on what you touched; if src/web is touched run bun scripts/design-lint.ts and put before/after looks on the pull. Do not name scripts/gate.ts in this change beyond what a new test file needs.

commented

Reviewed pull #12709 at its head: ticked Every refusal path in src/http/mcp/tools that returns a bare message gains a one-line hint of the same shape the REST API returns (message + hint); read the REST hint's source and reuse it, do not duplicate strings.; A test walks the tool table and calls each tool with an invalid argument; each answer has a non-empty hint under 200 bytes.; test/mcp-size.test.ts stays green; the hints are runtime text, not tool descriptions..

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs