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 #8872
This adds a bugs MCP tool that lists open bugs with their clocks. The gate, tsc, and the MCP tests (mcp-bugs, mcp-size, mcp-tools, mcp) all pass. I didn't run the OpenAPI tests.
stopped parked by the crew deploy b7e834f
3 earlier comments
This adds a bugs MCP tool that lists open bugs with their clocks. The gate, tsc, and the MCP tests (mcp-bugs, mcp-size, mcp-tools, mcp) all pass. I didn't run the OpenAPI tests. I couldn't use keep_plan (it isn't available here), so there is no plan on the issue.
- What it returns: with no arguments,
src/http/mcp/tools/bugs.tsanswers{ open, overdue, says, bugs: [{ repo, number, high, createdAt, dueAt, overdue }] }. The list is ordered with the earliest due time first. It is read-only and built onopenBugsinsrc/flow/bugs.ts, the same source as home's tile and the terminal screen. - Gating: the same as the terminal screen. A forge admin who isn't an agent sees every repository. Anyone else sees only public repositories.
- Counts: for a non-admin,
openandoverduecount only the bugs they can see. The terminal screen hides the count from non-admins altogether, so the tool differs there on purpose. This keeps a private repository's bug from leaking through a total. - Index and contract test: the tool is in
tools/index.ts, generated byscripts/mcp-tools.ts, and in the tool list thattest/mcp.test.tschecks. - Not done: I made this a new tool, as the issue asked, rather than an
actionon an existing one. The size ceilings are unchanged. - Tests:
test/mcp-bugs.test.tschecks that an overdue high bug is named with a 4 h due time. It also checks that a guest sees neither a private repository's bug nor its counts.
To try it, call tools/call with bugs and a token. An admin token shows all repositories. A non-admin token shows public ones only.
The bugs MCP tool now lists open and overdue bugs with their clocks, gated as the terminal screen is. The check failed because no commit message carried a "Why now:" line. I've pushed an empty commit that has one.
I did not rewrite the earlier commit, since force pushes are refused. The local gate script runs clean with the new commit, but I haven't seen the forge's check run on it.
- Tool:
src/http/mcp/tools/bugs.tsreturns{ open, overdue, says, bugs: [{ repo, number, high, createdAt, dueAt, overdue }] }, ordered with the earliest due time first. It is read-only. - Gating: a forge admin who isn't an agent sees every repository. Anyone else sees only public repositories, and their counts cover only those.
- Registration: the tool is in
tools/index.ts, andtest/mcp.test.tschecks that it is listed. - Tests:
test/mcp-bugs.test.tschecks that an overdue high bug is named and that a guest cannot see a private repository's bug.mcp-sizepasses. - Not done: I made it a new tool rather than an
actionon an existing one, as the issue asked. The size ceilings are unchanged.
To try it, call bugs over MCP with a token. An admin token shows all repositories. A non-admin token shows public ones only.
I've pushed a new commit with a "Why now:" line, but I haven't seen the forge's check pass on it. The local gate passed, and it also passed on the previous push, so I can't be sure this fixes the failure.
My guess is that the forge ignored the earlier commit because it was empty. This one also adds a short paragraph about the bugs tool to docs/MCP.md, so it changes a file. Its message says: "Why now: issue #8859 asks for the bug clock to be reachable through MCP, as home and the terminal already have it."
If the check still fails, the forge is probably reading something other than commit messages. If so, someone will need to look at how it reads them.
The tool is as before. It returns open and overdue counts and each bug's repository, number, priority and due time. A forge admin sees every repository, and anyone else sees only public ones.
Parked by the crew: the check stayed red through 2 automatic tries
This adds a
bugsMCP tool that lists open bugs with their clocks. The gate,tsc, and the MCP tests (mcp-bugs,mcp-size,mcp-tools,mcp) all pass. I didn't run the OpenAPI tests. I couldn't usekeep_plan(it isn't available here), so there is no plan on the issue.src/http/mcp/tools/bugs.tsanswers{ open, overdue, says, bugs: [{ repo, number, high, createdAt, dueAt, overdue }] }. The list is ordered with the earliest due time first. It is read-only and built onopenBugsinsrc/flow/bugs.ts, the same source as home's tile and the terminal screen.openandoverduecount only the bugs they can see. The terminal screen hides the count from non-admins altogether, so the tool differs there on purpose. This keeps a private repository's bug from leaking through a total.tools/index.ts, generated byscripts/mcp-tools.ts, and in the tool list thattest/mcp.test.tschecks.actionon an existing one. The size ceilings are unchanged.test/mcp-bugs.test.tschecks that an overdue high bug is named with a 4 h due time. It also checks that a guest sees neither a private repository's bug nor its counts.To try it, call
tools/callwithbugsand a token. An admin token shows all repositories. A non-admin token shows public ones only.Closes #8859