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 #9106
Check · Review · Land · Live done — Landed and live in production.
An agent can now list a repository's build pins through a new read-only `builds` MCP tool. It takes `{ repo }` and answers `{ items, next_cursor: null }`, the same rows `GET /api/v1/repos/:owner/:name/builds` gives.
shipped production is serving it deploy 652cd9c
An agent can now list a repository's build pins through a new read-only builds MCP tool. It takes { repo } and answers { items, next_cursor: null }, the same rows GET /api/v1/repos/:owner/:name/builds gives.
The gate, bun x tsc --noEmit, and mcp-builds, mcp-tools and mcp-size all pass. I did not run the full suite; the forge runs that on push.
- Access: the tool reads through
repoArg, the same repository read check the MCP uses elsewhere. A repository the caller cannot read answersnot_foundand names no pin. It haswrites: false, and itsdocline names the API route it mirrors. - Bound: it calls
listBuildPinsunchanged, so it stays bounded byPIN_LIMIT. - Listing:
/llms.txtbuilds its tool list live from each tool'sdoc, sobuildsshows up there without a separate edit.index.tswas regenerated withbun scripts/mcp-tools.ts. - Docs:
docs/features/build-pins.mdhas a newMCP:line. - Test:
test/mcp-builds.test.tspins a build withpinBuild, then expects the MCP result to equal the API response exactly. It also checks that a stranger getsnot_foundon a private repository, while the owner sees the pin. I did not run it with the tool removed. - Not done: no pin, note or delete actions; those stay person-only. I added a new tool file, as the issue asked, rather than an
actionon an existing tool.mcp-sizepasses, and I did not raise any ceiling. - Push order: my first push had a type error in the new test. The second commit fixed it, and the pull is clean now.
To try it, call the MCP tool builds with { "repo": "owner/name" }.
I pushed a new commit to the pull, and bun scripts/gate.ts now passes here. I did not wait for the forge's check on the new push.
The check failed on two gate rules, both about commit messages. They want a "Try:" line and a "Why now:" line. I couldn't amend the earlier commits, since force pushes are refused. So I added an empty commit that carries both lines:
- Why now: build pins are on main (#9062) but only a person can reach them; an agent has no MCP way to read them.
- Try: call the MCP tool
buildswith{"repo":"owner/name"}on the preview. It answers{items,next_cursor:null}, the same rowsGET /api/v1/repos/owner/name/buildsgives.
The code is unchanged since the last push, so the earlier test and type-check results still stand.
The failing check is fixed and pushed. test/mcp.test.ts keeps a hard-coded list of the tool names that tools/list returns. It didn't include the new builds tool, so it failed on the extra name. I added builds to that list. The test was out of date, not the tool.
test/mcp.test.ts now passes in full (48 tests) and the type check is clean. I didn't re-run the full suite here; the forge's check does that on this push. I did not re-run the gate this time. The new commit message carries the Why now: and Try: lines that the earlier gate rules wanted.
Read-only builds tool mirrors the API route exactly (same listBuildPins, same repoArg read gate, writes:false). Tests pass (mcp-builds, mcp-tools, mcp). Docs line is in build-pins.md, not README. No findings.
An agent can now list a repository's build pins through a new read-only
buildsMCP tool. It takes{ repo }and answers{ items, next_cursor: null }, the same rowsGET /api/v1/repos/:owner/:name/buildsgives.The gate,
bun x tsc --noEmit, andmcp-builds,mcp-toolsandmcp-sizeall pass. I did not run the full suite; the forge runs that on push.repoArg, the same repository read check the MCP uses elsewhere. A repository the caller cannot read answersnot_foundand names no pin. It haswrites: false, and itsdocline names the API route it mirrors.listBuildPinsunchanged, so it stays bounded byPIN_LIMIT./llms.txtbuilds its tool list live from each tool'sdoc, sobuildsshows up there without a separate edit.index.tswas regenerated withbun scripts/mcp-tools.ts.docs/features/build-pins.mdhas a newMCP:line.test/mcp-builds.test.tspins a build withpinBuild, then expects the MCP result to equal the API response exactly. It also checks that a stranger getsnot_foundon a private repository, while the owner sees the pin. I did not run it with the tool removed.actionon an existing tool.mcp-sizepasses, and I did not raise any ceiling.To try it, call the MCP tool
buildswith{ "repo": "owner/name" }.Closes #9091