Public: anyone can read this; the crew can change it.
Adding or changing an MCP tool no longer has to edit docs/MCP.md: the tool table stops being a checked, committed file #8313
Check · Review · Land · Live done — Landed and live in production.
Adding or changing an MCP tool no longer touches docs/MCP.md. `bun scripts/mcp-tools.ts` now writes only `src/http/mcp/tools/index.ts`, and says so when it runs: "current: src/http/mcp/tools/index.ts, the only file this writes" and "docs/MCP.md is not written". The live list in `/llms.txt`'s `## MCP tools` replaces the table.
shipped production is serving it deploy 78f82e5
Adding or changing an MCP tool no longer touches docs/MCP.md. bun scripts/mcp-tools.ts now writes only src/http/mcp/tools/index.ts, and says so when it runs: "current: src/http/mcp/tools/index.ts, the only file this writes" and "docs/MCP.md is not written". The live list in /llms.txt's ## MCP tools replaces the table.
What to look at
- The
/llms.txtline shows each tool'sdoc. The issue assumed this section was built fromdoc, butsrc/web/llms_tools.tsuseddescription, which never contains the doc text. Each line now readsdoc ?? description, so/llms.txtshows the argument signature and fuller text the table showed.reportis now listed there too (setMcpTools([...TOOLS, REPORT_TOOL])insrc/http/server.ts), since the table had a row for it.test/llms-tools.test.tswas updated to expect this: the test was right before, and this is an intended change in behaviour. test/mcp-tools.test.ts:
- The "docs/MCP.md's tool table is current" test is gone.
- A new test checks that every tool's doc (or its description when it has none), report included, is its line in the tools section.
- Another adds a fixture tool file in a temp directory. It checks that the index gains exactly one line, that the script writes no file but the index, and that the fixture's doc reaches the live list.
- The code-point ordering test now checks byName directly.
- I deleted
test/mcp-docs.test.ts. Its two tests ("every tool in tools/list has a row in docs/MCP.md" and its reverse) still read the table. With the script no longer writing rows, a new tool would have needed a hand-written row, which defeats the issue. Completeness is still covered: the index-equals-files test,toolNames, and the/llms.txttest. - Tree gates:
TREE_GATESinsrc/checks/shared_red.tsstill named the removed tests, andshared-red.test.tsrequires every gate to name a test that exists. I dropped those names and narrowed the #7906 shared-red test to the index gate alone. - Comments: the
doccomments insrc/http/mcp/shared.tsandsrc/http/mcp.tsand the "Add an MCP tool" line inCLAUDE.mdnow point at/llms.txt.
Not done: docs/MCP.md is unchanged, as the issue asks. Its table and its "Adding a tool" paragraph are now stale; the next issue removes them.
Checks: bun scripts/gate.ts, bun x tsc --noEmit, bun scripts/mcp-tools.ts --check, and the tests for this change all pass (mcp-tools, llms-tools, shared-red, mcp-size, held-relieves-map, plus 12 suites that read /llms.txt or list tools). scripts/fast.ts said the diff was too broad to pick tests for, so I chose these myself.
Try it: bun scripts/mcp-tools.ts, then curl …/llms.txt and find the ## MCP tools section: every tool is listed by its doc, report included.
🤖 Generated with Claude Code
Read in full. No security finding: /llms.txt is public and already listed these tools by description, and report is the one tool open without a token. The script writes only the index and its --check path is intact. Tree gates and the shared-red test are consistent with the deleted tests. Tests cover the doc line, the one-line index growth and the single write. I did not run the preview. Two non-blocking notes: the writeFileSync regex in the new test is a source grep and brittle, and docs/MCP.md still describes the old table until the follow-up issue removes it.
Adding or changing an MCP tool no longer touches docs/MCP.md.
bun scripts/mcp-tools.tsnow writes onlysrc/http/mcp/tools/index.ts, and says so when it runs: "current: src/http/mcp/tools/index.ts, the only file this writes" and "docs/MCP.md is not written". The live list in/llms.txt's## MCP toolsreplaces the table.What to look at
/llms.txtline shows each tool'sdoc. The issue assumed this section was built fromdoc, butsrc/web/llms_tools.tsuseddescription, which never contains the doc text. Each line now readsdoc ?? description, so/llms.txtshows the argument signature and fuller text the table showed.reportis now listed there too (setMcpTools([...TOOLS, REPORT_TOOL])insrc/http/server.ts), since the table had a row for it.test/llms-tools.test.tswas updated to expect this: the test was right before, and this is an intended change in behaviour.test/mcp-tools.test.ts:- The "docs/MCP.md's tool table is current" test is gone. - A new test checks that every tool's
doc(or itsdescriptionwhen it has none),reportincluded, is its line in the tools section. - Another adds a fixture tool file in a temp directory. It checks that the index gains exactly one line, that the script writes no file but the index, and that the fixture'sdocreaches the live list. - The code-point ordering test now checksbyNamedirectly.test/mcp-docs.test.ts. Its two tests ("every tool in tools/list has a row in docs/MCP.md" and its reverse) still read the table. With the script no longer writing rows, a new tool would have needed a hand-written row, which defeats the issue. Completeness is still covered: the index-equals-files test,toolNames, and the/llms.txttest.TREE_GATESinsrc/checks/shared_red.tsstill named the removed tests, andshared-red.test.tsrequires every gate to name a test that exists. I dropped those names and narrowed the #7906 shared-red test to the index gate alone.doccomments insrc/http/mcp/shared.tsandsrc/http/mcp.tsand the "Add an MCP tool" line inCLAUDE.mdnow point at/llms.txt.Not done: docs/MCP.md is unchanged, as the issue asks. Its table and its "Adding a tool" paragraph are now stale; the next issue removes them.
Checks:
bun scripts/gate.ts,bun x tsc --noEmit,bun scripts/mcp-tools.ts --check, and the tests for this change all pass (mcp-tools,llms-tools,shared-red,mcp-size,held-relieves-map, plus 12 suites that read/llms.txtor list tools).scripts/fast.tssaid the diff was too broad to pick tests for, so I chose these myself.Try it:
bun scripts/mcp-tools.ts, thencurl …/llms.txtand find the## MCP toolssection: every tool is listed by itsdoc,reportincluded.🤖 Generated with Claude Code
Closes #8304