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

Every tool the agent guide in docs/MCP.md names exists, and every tool in the manifest is named once #13040

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A new test, test/mcp-guide.test.ts, now checks docs/MCP.md against the registered tools, and the guide opens with the first three calls. It and test/mcp-size.test.ts pass, with test/mcp-table.test.ts. bun scripts/design-lint.ts and bun x tsc --noEmit are clean.

Notes

shipped production is serving it deploy 59903fa

opened this

A new test, test/mcp-guide.test.ts, now checks docs/MCP.md against the registered tools, and the guide opens with the first three calls. It and test/mcp-size.test.ts pass, with test/mcp-table.test.ts. bun scripts/design-lint.ts and bun x tsc --noEmit are clean. I did not run bun scripts/gate.ts or the full suite; the forge's check runs those on push.

  • Tool names: the test fails on any tool the guide calls that isn't registered, and on any registered tool missing from the table. It also fails if a tool appears twice in the table. In the prose it counts a backticked word as a tool call when it is written as a call, name(…), or contains an underscore.
  • Exceptions: I exempted the error codes (rate_limited, queue_full, not_found, no_pillar, unknown_pillar, no_later_gate) and run_wait, which the guide lists as not done yet. A new underscored error code in the prose would need adding to that list.
  • Default list: the tools named in the "default list" sentence must all be registered.
  • First screen: a new "First three calls" section sits before "Shape": start({ action: "contribute" }), contribute() and find_tool({ query }). The test checks that each is a real tool and that contribute is a real action of start.
  • Left alone: no tool was added or enlarged, no ceiling was raised, and no dependency was added.
  • Not covered: single-word tool names such as tell or apps in the prose are only checked inside the default-list sentence. Matching every bare backticked word would catch too many argument names.

Closes #13037

commented

A new test, test/mcp-guide.test.ts, now checks docs/MCP.md against the registered tools, and the guide opens with the first three calls. It and test/mcp-size.test.ts pass, with test/mcp-table.test.ts. bun scripts/design-lint.ts and bun x tsc --noEmit are clean. I did not run bun scripts/gate.ts or the full suite; the forge's check runs those on push.

  • Tool names: the test fails on any tool the guide calls that isn't registered, and on any registered tool missing from the table. It also fails if a tool appears twice in the table. In the prose it counts a backticked word as a tool call when it is written as a call, name(…), or contains an underscore.
  • Exceptions: I exempted the error codes (rate_limited, queue_full, not_found, no_pillar, unknown_pillar, no_later_gate) and run_wait, which the guide lists as not done yet. A new underscored error code in the prose would need adding to that list.
  • Default list: the tools named in the "default list" sentence must all be registered.
  • First screen: a new "First three calls" section sits before "Shape": start({ action: "contribute" }), contribute() and find_tool({ query }). The test checks that each is a real tool and that contribute is a real action of start.
  • Left alone: no tool was added or enlarged, no ceiling was raised, and no dependency was added.
  • Not covered: single-word tool names such as tell or apps in the prose are only checked inside the default-list sentence. Matching every bare backticked word would catch too many argument names.
commented

A new test, test/mcp-guide.test.ts, now checks that every tool docs/MCP.md names exists and that every registered tool is named once in the guide's tool table. I rewrapped the comment line that failed the gate's 100-column rule and pushed. bun scripts/gate.ts is clean and test/mcp-guide.test.ts passes. I did not rerun test/mcp-size.test.ts, test/mcp-table.test.ts or bun x tsc --noEmit after the rewrap; they passed on the first push, and the rewrap changed only comment and layout.

  • Guide check: the test fails on a tool the guide's prose calls that isn't registered, a registered tool missing from the table, or a tool listed twice. It also fails if the sentence naming the default tool list mentions an unregistered tool. A backticked word in the prose counts as a tool call when it is written name(…) or contains an underscore. I exempted the error codes (rate_limited, queue_full, not_found, no_pillar, unknown_pillar, no_later_gate) and run_wait, which the guide lists as not done yet. A new underscored error code in the prose needs adding to that list.
  • First screen: a new "First three calls" section sits before "Shape" in docs/MCP.md: start({ action: "contribute" }), contribute() and find_tool({ query }). The test checks that each is a real tool and that contribute is a real action of start.
  • Not done: single-word tool names such as tell or apps in the prose are only checked inside the default-list sentence. Matching every bare backticked word would catch too many argument names.
  • Constraints kept: no tool was added or enlarged, no ceiling was raised, and no dependency was added.

Run bun test test/mcp-guide.test.ts test/mcp-size.test.ts test/mcp-table.test.ts to try it.

Approved

Docs plus one test, no tool added or enlarged; test/mcp-guide.test.ts and mcp-size pass here. start/contribute is a real tool and action. Next two things: (1) in the first-screen test, if (action) makes the action check optional; assert every call has an action or is a known no-action tool, so a typo cannot slip through. (2) The NOT_TOOLS list of error codes is hand-kept; derive it from the error-code source or match only name( calls so a new underscored code does not fail the guide test.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs