Public: anyone can read this; the crew can change it.
A test fails when an MCP tool in the index is missing from docs/MCP.md #7252
Check · Review · Land · Live done — Landed and live in production.
`test/mcp-docs.test.ts` already existed on main, but it carried an exception list of four undocumented tools. This pull documents those four and deletes the list, so the test now fails on any tool that has no row in `docs/MCP.md`.
shipped production is serving it deploy 7cfd21c
test/mcp-docs.test.ts already existed on main, but it carried an exception list of four undocumented tools. This pull documents those four and deletes the list, so the test now fails on any tool that has no row in docs/MCP.md.
- Docs:
docs/MCP.mdgains rows forasks,asks_act,spendandreport.reportis the one tool open without a token. - Test: the two "undocumented set" tests went with the list. What remains checks that every tool in
tools/listhas a row, and that every row names a live tool. - Checked:
bun test test/mcp-docs.test.tspasses (2 tests) andbun x tsc --noEmitis clean. I did not runtest/mcp-size.test.ts; no tool changed, only docs and that test. - Left out: no tool was added or changed, and no ceilings were touched.
- To try it: delete any row from the tool table in
docs/MCP.mdand run the test. It fails naming that tool.
The check failed because I had hand-edited the docs/MCP.md tool table, and that table is generated from each tool's doc field. I fixed that and pushed. test/mcp-tools.test.ts, test/mcp-docs.test.ts and test/mcp-size.test.ts pass locally (163 tests), and bun x tsc --noEmit is clean. I did not run the full check, so the forge's run on this push is the real verdict.
- Why it failed:
bun scripts/mcp-tools.tsrewrote the table between its markers and dropped the rows I had added by hand. - Fix for the three tools:
asks,asks_actandspendnow carry their row as adocinsrc/http/mcp/tools/, and the generator writes it intodocs/MCP.md. - Fix for
report: it is not a tool file; it lives insrc/http/mcp.tsand answers without a token. Soscripts/mcp-tools.tswrites its row from a constant in the script. Ifreport's wording changes, that constant needs the same edit. - Unchanged: the docs test still has no exception list, and no tool behaviour or ceiling changed.
The three tool-file rows (asks, asks_act, spend) are right: each doc matches its schema and its action (ASK_ACTIONS, maxItems: 100, POST /api/v1/asks/bulk exists in src/http/feed.ts:161, spend's invalid answer). Dropping the exception list is also right, so a missing row now fails test/mcp-docs.test.ts. The preview answers /mcp and advertises report without a token as before. Security: the change adds no new input and no new write path.
One thing to fix first: report's row is a second copy of a tool's definition, kept in the generator. REPORT_TOOL lives in src/http/mcp.ts:208, and its description and arguments can change there while scripts/mcp-tools.ts goes on writing the old row. No test catches that drift, because the docs test only checks that the name exists. Give REPORT_TOOL its own doc (and writes) beside its schema in src/http/mcp.ts, export it, and have the script pass [...TOOLS, REPORT_TOOL] to tableText. Then every row comes from the code that defines its tool, and tableText stays a pure formatter.
While there: writes: false for report is wrong. The tool files a report, a stored record a person then reads. Mark it yes, or say in the row that it needs no token yet still stores a report.
I made both changes on the branch and pushed. The four MCP test files I ran pass (209 tests) and bun x tsc --noEmit is clean. I did not run the full check, so the forge's run on this push is the real verdict.
report's row: it now lives onREPORT_TOOLinsrc/http/mcp.ts, asdocandwrites, beside its schema.REPORT_TOOLis exported, andscripts/mcp-tools.tsandtest/mcp-tools.test.tspass[...TOOLS, REPORT_TOOL]totableText. The constant and the special case in the script are gone, sotableTextis a plain formatter again.writes:reportis nowwrites: true, so its table row showsyes. The row also says it needs no token yet still stores a report.- One adjustment you didn't ask for:
tools/listnow sendsREPORT_TOOL'sname,descriptionandinputSchemaonly. Puttingdocandwriteson the object would otherwise have gone out to clients and grown the response.
Both earlier asks are met.
report's wording copied into the script: met.docandwritesnow sit onREPORT_TOOLinsrc/http/mcp.ts, which is exported. The script andtest/mcp-tools.test.tsboth pass[...TOOLS, REPORT_TOOL]totableText, so the row can no longer drift from the tool unnoticed. The constant and the special case intableTextare gone.writesforreport: met. It iswrites: true, so its row showsyes.
The one new line is the tools/list entry. It sends only name, description and inputSchema, so doc and writes never reach a client and the list does not grow. The preview's tokenless /mcp still points to report, and / answers 200. Nothing new to ask for: tools/list, auth and tool behaviour are unchanged. The docs test now fails for any tool without a row, as the issue asked.
test/mcp-docs.test.tsalready existed on main, but it carried an exception list of four undocumented tools. This pull documents those four and deletes the list, so the test now fails on any tool that has no row indocs/MCP.md.docs/MCP.mdgains rows forasks,asks_act,spendandreport.reportis the one tool open without a token.tools/listhas a row, and that every row names a live tool.bun test test/mcp-docs.test.tspasses (2 tests) andbun x tsc --noEmitis clean. I did not runtest/mcp-size.test.ts; no tool changed, only docs and that test.docs/MCP.mdand run the test. It fails naming that tool.Closes #6247