Public: anyone can read this; the crew can change it.
An agent lists a repository's build pins through an MCP builds tool, as GET /api/v1/repos/:owner/:name/builds does #9091
Reviewed pull #9106 at its head: ticked A read-only builds tool in src/http/mcp/tools/builds.ts, registered in index.ts, takes { repo }. It answers { items, next_cursor: null } with the same rows listBuildPins gives the API route in src/http/api/builds.ts: label, commit, who pinned it, note, parent and source.; A repository the caller cannot read answers not found, as the API does, and names no pin. The tool writes nothing. Pinning, noting and deleting stay person-only on the page, the API and the terminal, as the doc says.; The tool has writes: false, and its doc line names the API route it mirrors. docs/features/build-pins.md adds an MCP: line, and /llms.txt lists the tool if it lists tools by name.; A test pins a build with pinBuild (as test/build-pins.test.ts already does), calls the MCP tool and the API route, and expects the same items. It also checks that a caller without read access gets not found. The test fails without the tool, and test/mcp-tools.test.ts still passes, including any tool-count or doc-line checks there.; bun test passes..
Intent: the build pins that #9062 put on main, on the page, the API and the terminal, can also be reached by an agent through MCP. Done means reachable through MCP, and today no MCP tool reads
refs/builds/.Today
docs/features/build-pins.mdnames a page, the API and the terminal.src/http/mcp/tools/has nobuildstool.pins.tsthere is about pinned repositories, not build pins.Done looks like:
buildstool insrc/http/mcp/tools/builds.ts, registered inindex.ts, takes{ repo }. It answers{ items, next_cursor: null }with the same rowslistBuildPinsgives the API route insrc/http/api/builds.ts: label, commit, who pinned it, note, parent and source.writes: false, and itsdocline names the API route it mirrors.docs/features/build-pins.mdadds anMCP:line, and/llms.txtlists the tool if it lists tools by name.pinBuild(astest/build-pins.test.tsalready does), calls the MCP tool and the API route, and expects the same items. It also checks that a caller without read access gets not found. The test fails without the tool, andtest/mcp-tools.test.tsstill passes, including any tool-count or doc-line checks there.bun testpasses.Files expected:
src/http/mcp/tools/builds.ts,src/http/mcp/tools/index.ts,docs/features/build-pins.md, one test file (test/mcp-builds.test.ts).Risks: keep it read-only. Agents are refused pin writes by design, so do not add pin, note or delete actions. Read through the same repository read check as the API, not a weaker one.
listBuildPinsreads git, so it has to stay bounded byPIN_LIMIT.Fits: scout or torque.