Public: anyone can read this; the crew can change it.
MCP `map` takes `first: <number>` so an agent or a person can put a ready issue first #8226
Check · Review · Land · Live done — Landed and live in production.
The MCP `map` tool now takes `first: <number>`, and the answer lists that issue first among ready. The new test, the `mcp-size` test, `tsc`, `scripts/gate.ts` and the 18 test files `scripts/fast.ts` named all pass. The forge's full check hasn't run yet.
shipped production is serving it deploy 1f09d72
The MCP map tool now takes first: <number>, and the answer lists that issue first among ready. The new test, the mcp-size test, tsc, scripts/gate.ts and the 18 test files scripts/fast.ts named all pass. The forge's full check hasn't run yet.
- Writer:
first: Ngoes through the sameputIssueFirstaction as the map page and the terminal. An issue the caller can't see counts as not found. - Reader: a reader with an
rwtoken getsforbidden. An agent caller is refused too, because the core rule only lets people rank. - Closed or blocked: a closed or blocked issue gets
invalid. - Missing: a missing issue number gets
no_such_issue. - Read-only tokens:
mapis now marked as a writing tool, but a call withoutfirstis still a plain read. Arotoken can read the plan and is refused only when it passesfirst. - Tool descriptions: the one-line description in
src/http/mcp/tools/map.tsis trimmed to fitmcp-size's 120-byte limit. Thefirstdetail is in thedocline, so it appears indocs/MCP.md, regenerated withbun scripts/mcp-tools.ts. - Test:
test/mcp-map-first.test.tscalls the tool as a writer and as a reader, and covers blocked, closed and missing issues.
The argument is app, as map already has it, not repo as the issue wrote it. Renaming it would break existing callers, so I didn't.
To try it, call map with { app: "owner/name", first: 3 } and ready[0] is issue 3.
Clean. map with first: N goes through the same putIssueFirst action the page and terminal use, so the writer gate and refusal wording are shared. The issue lookup applies mayView, so a sealed issue reads as not found. A ro token can still read the plan (readsWithout: "first") and is refused only when it passes first. The tests cover writer, reader, blocked, closed and missing issues, and the doc line is updated. No new dependency, no dead code.
The MCP
maptool now takesfirst: <number>, and the answer lists that issue first among ready. The new test, themcp-sizetest,tsc,scripts/gate.tsand the 18 test filesscripts/fast.tsnamed all pass. The forge's full check hasn't run yet.first: Ngoes through the sameputIssueFirstaction as the map page and the terminal. An issue the caller can't see counts as not found.rwtoken getsforbidden. An agent caller is refused too, because the core rule only lets people rank.invalid.no_such_issue.mapis now marked as a writing tool, but a call withoutfirstis still a plain read. Arotoken can read the plan and is refused only when it passesfirst.src/http/mcp/tools/map.tsis trimmed to fitmcp-size's 120-byte limit. Thefirstdetail is in thedocline, so it appears indocs/MCP.md, regenerated withbun scripts/mcp-tools.ts.test/mcp-map-first.test.tscalls the tool as a writer and as a reader, and covers blocked, closed and missing issues.The argument is
app, asmapalready has it, notrepoas the issue wrote it. Renaming it would break existing callers, so I didn't.To try it, call
mapwith{ app: "owner/name", first: 3 }andready[0]is issue 3.Closes #7807