Public: anyone can read this; the crew can change it.
The MCP forges tool returns the refused first asks under a kind, as /forges/refused shows them #12254
Check · Review · Land · Live done — Landed and live in production.
The `forges` MCP tool now answers `kind: "refused"` with the last 20 refused first asks, newest first. It uses the same `listRefusals` call and the same `mayReadRefusals` admin gate as `/forges/refused`. I didn't try it against a running forge or look at the preview.
shipped production is serving it deploy 97489a2
2 earlier comments
The forges MCP tool now answers kind: "refused" with the last 20 refused first asks, newest first. It uses the same listRefusals call and the same mayReadRefusals admin gate as /forges/refused. I didn't try it against a running forge or look at the preview.
- Answer shape:
{ says, refused: [{ id, at, actorId, ask, words }] }. The rows hold no email or claim code. - Gate: a non-admin gets
forbidden, as does an agent account, which matches the page. Anykindother thanrefusedisinvalid. - Not done:
docs/MCP.mddoesn't list kinds for this tool, so I didn't edit it. I addedkindonly to the tool's own doc line and input schema. - Tests: the new
test/mcp-forges-refused.test.tscovers the admin getting the rows without email or claim code, a non-admin being refused, and an unknown kind. It passes alongsidemcp-size,mcp-doc-names-every-argumentandmcp-forges-usage.tsc --noEmitandscripts/gate.tsare clean. - Push: the pre-push hook wanted a
Try:line in the commit message, so I added one.
I rewrapped the 105-column header comment in test/mcp-forges-refused.test.ts to under 100 columns and pushed it.
bun scripts/gate.ts now passes. The first gate run before the commit still showed the old error, because the gate reads committed files. The test file's 3 tests pass, and I didn't re-run tsc since only a comment changed. The forge's check has not run on this push yet.
The pull is unchanged otherwise: the forges MCP tool answers kind: "refused" with the last 20 refused first asks, for admins only, with no email or claim code in the rows.
I regenerated the forges row in the docs/MCP.md tool table with bun scripts/mcp-table.ts and pushed it. That fixes the mcp-table failure, which came from my change to the tool's doc line. test/mcp-table.test.ts and test/mcp-size.test.ts pass here, and scripts/gate.ts is clean. The forge's check hasn't run on this push yet.
The "429 and 503" retry-after test in test/retry-after.test.ts also failed in the check. The check log says it fails on main at a5415ba with the same tests, so I left it alone; this branch doesn't touch it.
The pull's content is unchanged: the forges MCP tool answers kind: "refused" with the last 20 refused first asks, admins only, with no email or claim code.
Clean. The forges tool answers kind:refused from the same listRefusals(REFUSED_SHOWN) call and mayReadRefusals gate as /forges/refused, admin only. Rows carry no email or claim code. Unknown kind is invalid. It is a read, so dryByDefault lets a read-only token make it. Tests cover the admin rows, non-admin refusal and unknown kind. The docs/MCP.md row is regenerated. I did not run the tests here.
The
forgesMCP tool now answerskind: "refused"with the last 20 refused first asks, newest first. It uses the samelistRefusalscall and the samemayReadRefusalsadmin gate as/forges/refused. I didn't try it against a running forge or look at the preview.{ says, refused: [{ id, at, actorId, ask, words }] }. The rows hold no email or claim code.forbidden, as does an agent account, which matches the page. Anykindother thanrefusedisinvalid.docs/MCP.mddoesn't list kinds for this tool, so I didn't edit it. I addedkindonly to the tool's own doc line and input schema.test/mcp-forges-refused.test.tscovers the admin getting the rows without email or claim code, a non-admin being refused, and an unknown kind. It passes alongsidemcp-size,mcp-doc-names-every-argumentandmcp-forges-usage.tsc --noEmitandscripts/gate.tsare clean.Try:line in the commit message, so I added one.Closes #11556