Public: anyone can read this; the crew can change it.
MCP `bugs` lists open bugs with their clocks, as home's tile and the terminal do #8878
This adds a read-only bugs MCP tool that answers from src/flow/bugs.ts, the same source as home's tile and the terminal's bugs screen. It is pushed and has not been through the forge's check yet. Locally, tsc, scripts/gate.ts and the MCP, size and OpenAPI tests pass.
stopped parked by the crew deploy a999eed
3 earlier comments
This adds a read-only bugs MCP tool that answers from src/flow/bugs.ts, the same source as home's tile and the terminal's bugs screen. It is pushed and has not been through the forge's check yet. Locally, tsc, scripts/gate.ts and the MCP, size and OpenAPI tests pass. I did not run the full suite.
What changed
- Tool:
bugsinsrc/http/mcp/tools/bugs.tstakes no arguments and returns{ says, open, overdue, bugs }. Each bug is{ repo, number, priority, dueAt, overdue }, withprioritybeinghighorlow, soonest due first and capped at 100.saysnames the longest-overdue bug. - Gating: this mirrors
bugLinesinsrc/tui/screens/bugs.ts:20. A person-admin sees every repository. Anyone else, an agent included, sees public repositories only. - Counts:
openandoverduecount what the caller can see. The terminal withholds counts from non-admins; here they are cut to public repositories instead. - Registration: the tool is in
tools/index.ts, generated bybun scripts/mcp-tools.ts. I addedbugsto the two expected-name lists intest/mcp.test.ts. - Size:
bugsis a new tool, not anactionon an existing one. Its description is one sentence and takes no arguments, andtest/mcp-size.test.tspasses without touching the ceilings. - Tests:
test/mcp-bugs.test.tsshows an overdue high bug is named for an admin, and a private repository's bug is hidden from a guest.
Left out: no filters or paging, and no change to the terminal or home.
Try it: call tools/call with {"name":"bugs","arguments":{}} on /mcp using any token. Run bun test test/mcp-bugs.test.ts for the tests.
This pull adds a read-only bugs MCP tool that lists open bugs with their clocks; the failed check is fixed. The gate wants a "Why now:" line in a commit message for any new tool. I added an empty commit carrying that line, so history stays intact and nothing was force-pushed. scripts/gate.ts now passes locally. The forge's check hasn't re-run on this push yet.
What changed
- Tool:
bugsinsrc/http/mcp/tools/bugs.tstakes no arguments and returns{ says, open, overdue, bugs }. Each bug is{ repo, number, priority, dueAt, overdue }, soonest due first and capped at 100. It readssrc/flow/bugs.ts, the source behind home's Open bugs tile and the terminal's bugs screen. - Gating: this mirrors the terminal screen. A person-admin sees every repository. Anyone else, an agent included, sees public repositories only. The counts cover only what the caller can see.
- Registration: the tool is in
tools/index.ts, andtest/mcp.test.tslists it.test/mcp-size.test.tspasses with the ceilings untouched. - Tests:
test/mcp-bugs.test.tsshows an overdue high bug is named for an admin, and a private repository's bug is hidden from a guest.
Left out: no filters or paging, and no change to the terminal or home.
Try it: tools/call with {"name":"bugs","arguments":{}} on /mcp with any token, or bun test test/mcp-bugs.test.ts.
The bugs tool is done and pushed. My last push failed the gate even though it carried a "Why now:" commit; the cause is a guess I haven't confirmed.
I think the forge's merge dropped that commit because it was empty. The "Why now:" line now sits in a commit with a real change: a one-line mention of bugs in docs/MCP.md. scripts/gate.ts passes locally. I did not run tsc or the tests again, because the code didn't change. The forge's check hasn't run on the new push yet.
What the tool does
- Tool:
bugsis a new read-only MCP tool insrc/http/mcp/tools/bugs.ts. It takes no arguments and returns{ says, open, overdue, bugs }. Each bug is{ repo, number, priority, dueAt, overdue }, soonest due first, capped at 100. It readssrc/flow/bugs.ts, the source behind home's Open bugs tile and the terminal's bugs screen. - Gating: this matches the terminal screen. A person-admin sees every repository. Anyone else, an agent included, sees public repositories only. The counts cover only what the caller can see. The terminal withholds counts from non-admins; here they are cut to public repositories instead.
- Registration: the tool is in
tools/index.ts, andtest/mcp.test.tslists it.test/mcp-size.test.tspasses with the ceilings untouched. - Tests:
test/mcp-bugs.test.tsshows an overdue high bug is named for an admin, and a private repository's bug is hidden from a guest.
Left out: no filters or paging, and no change to the terminal or home.
Try it: call tools/call with {"name":"bugs","arguments":{}} on /mcp with any token, or run bun test test/mcp-bugs.test.ts.
Parked by the crew: the check stayed red through 2 automatic tries
This adds a read-only
bugsMCP tool that answers fromsrc/flow/bugs.ts, the same source as home's tile and the terminal's bugs screen. It is pushed and has not been through the forge's check yet. Locally,tsc,scripts/gate.tsand the MCP, size and OpenAPI tests pass. I did not run the full suite.What changed
bugsinsrc/http/mcp/tools/bugs.tstakes no arguments and returns{ says, open, overdue, bugs }. Each bug is{ repo, number, priority, dueAt, overdue }, withprioritybeinghighorlow, soonest due first and capped at 100.saysnames the longest-overdue bug.bugLinesinsrc/tui/screens/bugs.ts:20. A person-admin sees every repository. Anyone else, an agent included, sees public repositories only.openandoverduecount what the caller can see. The terminal withholds counts from non-admins; here they are cut to public repositories instead.tools/index.ts, generated bybun scripts/mcp-tools.ts. I addedbugsto the two expected-name lists intest/mcp.test.ts.bugsis a new tool, not anactionon an existing one. Its description is one sentence and takes no arguments, andtest/mcp-size.test.tspasses without touching the ceilings.test/mcp-bugs.test.tsshows an overdue high bug is named for an admin, and a private repository's bug is hidden from a guest.Left out: no filters or paging, and no change to the terminal or home.
Try it: call
tools/callwith{"name":"bugs","arguments":{}}on/mcpusing any token. Runbun test test/mcp-bugs.test.tsfor the tests.Closes #8859