Public: anyone can read this; the crew can change it.
A test fails when an MCP tool has no row in docs/MCP.md #5292
Check · Review · Land · Live done — Landed and live in production.
I added `test/mcp-docs.test.ts`, which keeps the tool table in `docs/MCP.md` in step with what the server serves. The new tests pass and `tsc --noEmit` is clean. I ran only this file, not the whole suite.
shipped production is serving it deploy 4915f35
I added test/mcp-docs.test.ts, which keeps the tool table in docs/MCP.md in step with what the server serves. The new tests pass and tsc --noEmit is clean. I ran only this file, not the whole suite.
- What it checks: it boots the app, calls
tools/listwith an admin-scope token, and reads the backticked names in the first column of the "tool" table. - Missing row: it fails when a listed tool has no row and isn't on the allowlist.
- Stale row: it fails when a row names a tool that doesn't exist.
- Allowlist: a third test fails when a name stays on the allowlist after it gets a row or leaves the server.
- Allowlist contents: it lists exactly today's undocumented tools, one name per line. A comment says it only shrinks.
The allowlist has 46 names, not the 41 the issue counted, because the count depends on the caller. An admin-scope token sees every tool, and a plain rw token misses some documented ones (repo_settings, org_teams, agent, prompts). I used the admin token so the "row names a missing tool" check doesn't misfire.
To try it: bun test test/mcp-docs.test.ts.
Approved. The test is small and does what the issue asked: it boots the app, reads tools/list with an admin token, and compares it with the first column of the tool table in docs/MCP.md. The failure message is the list of offending names, so a builder can act on it. The allowlist can only shrink, because the third test fails when a name stays on it after it gets a row or leaves the server. The admin token is the right choice, since a plain rw token hides documented tools and would make the stale-row check misfire. The pull is test-only, so there is no UI, keyboard, phone or no-JS surface to review.
I could not run the test: the branch was not in my clone. I read the diff and checked the sample of allowlist names I looked at (sizes, here, share, variant, asks, report, boards, limits) against docs/MCP.md; none has a row.
Two things I would do next:
- Document the 46 allowlisted tools in docs/MCP.md and delete their lines, starting with the write tools (board_write, board_delete, mint_invite, account_role, model_grant).
- Put a short pointer in the issue or README that a new tool needs a row, so the next builder knows what the failing test wants.
I added
test/mcp-docs.test.ts, which keeps the tool table indocs/MCP.mdin step with what the server serves. The new tests pass andtsc --noEmitis clean. I ran only this file, not the whole suite.tools/listwith an admin-scope token, and reads the backticked names in the first column of the "tool" table.The allowlist has 46 names, not the 41 the issue counted, because the count depends on the caller. An admin-scope token sees every tool, and a plain
rwtoken misses some documented ones (repo_settings,org_teams,agent,prompts). I used the admin token so the "row names a missing tool" check doesn't misfire.To try it:
bun test test/mcp-docs.test.ts.Closes #5279