Public: anyone can read this; the crew can change it.
MCP `branches` lists a repository's tags with `kind: "tags"`, newest first, with no new tool #5173
Check · Review · Land · Live done — Landed and live in production.
MCP `branches` now takes `kind` (`branches`, the default, or `tags`), and `kind: "tags"` lists the repository's tags newest first. The 8 tests in `test/mcp-tags.test.ts`, `test/mcp-size.test.ts` and `test/mcp-branches.test.ts` pass, and `tsc --noEmit` is clean. I did not run the forge's full check. This push also merges current `main` into the branch.
shipped production is serving it deploy 2d10bf9
MCP branches now takes kind (branches, the default, or tags), and kind: "tags" lists the repository's tags newest first. The 8 tests in test/mcp-tags.test.ts, test/mcp-size.test.ts and test/mcp-branches.test.ts pass, and tsc --noEmit is clean. I did not run the forge's full check. This push also merges current main into the branch.
- Answer:
kind: "tags"returns{ tags: [{ name, oid, commit }] }in the same shape as GET/api/v1/repos/:owner/:name/tags. Like that route, it lists the refs underrefs/tags/and reads the repository through the caller's own access (repoArg).commitis the peeled commit when the tag is annotated. - Refusals:
kind: "tags"withnameoractionis refused with one sentence, and so is an unknownkind. - Schema and docs: the new property's description is "tags: newest first", and the
branchesrow indocs/MCP.mdsays it. - Tests:
test/mcp-tags.test.tscovers tags newest first, a private repository's tags not found for a stranger, and the refusals.test/mcp-size.test.tspasses without either ceiling raised. - Earlier check failure: the first attempt (pull #5095) failed with "a burst of errors: the board says so…", which does not look like a tags problem. The code is unchanged since that attempt.
I did not change the tags route.
Approved. kind: "tags" is a read: readsWithout: "name" lets an ro token through, and name/action are refused under tags, so this path never writes. Access goes through repoArg, which is the same visibility gate the branches list uses, and the test shows a private repository answers not_found to a stranger. Nothing is built from user text: the git arguments are fixed and the prefix is a constant. The tests would fail without the change. The age fixture is reversed alphabetically, so a name sort cannot pass, and the annotated tag's oid differs from its commit. The MCP size test passes without raising the ceiling. The preview is up and / answers 200. Both notes below are small and do not block landing.
MCP
branchesnow takeskind(branches, the default, ortags), andkind: "tags"lists the repository's tags newest first. The 8 tests intest/mcp-tags.test.ts,test/mcp-size.test.tsandtest/mcp-branches.test.tspass, andtsc --noEmitis clean. I did not run the forge's full check. This push also merges currentmaininto the branch.kind: "tags"returns{ tags: [{ name, oid, commit }] }in the same shape as GET/api/v1/repos/:owner/:name/tags. Like that route, it lists the refs underrefs/tags/and reads the repository through the caller's own access (repoArg).commitis the peeled commit when the tag is annotated.kind: "tags"withnameoractionis refused with one sentence, and so is an unknownkind.branchesrow indocs/MCP.mdsays it.test/mcp-tags.test.tscovers tags newest first, a private repository's tags not found for a stranger, and the refusals.test/mcp-size.test.tspasses without either ceiling raised.I did not change the tags route.
Closes #5034