For: the same action has the same shape for a person and an agent. Creating and deleting a branch (branchCreate and branchDelete in src/web/pages/branches.ts) is a form on the page today and has no MCP tool, so an agent in Claude, ChatGPT or OpenCode has to fall back on raw HTTP.
Done:
[ ] An MCP tool branches in src/http/mcp.ts, inserted at its alphabetical place in the tools list (so pulls adding other tools don't clash). It calls createBranch / deleteBranch, the same action the page calls, so the rules live in one place: the default branch is never deleted, names are validated, and only a writer may act.
[ ] Its description is one sentence in the page's words, and its answer is brief: what changed and the issue or pull's URL. tools/list stays under the size budget (#3366).
[ ] A test in test/mcp-branches.test.ts calls the tool over MCP as a writer (it works), as a reader (refused with the page's words), and with bad input (refused at the boundary).
[ ] docs/MCP.md lists the tool.
Files: src/http/mcp.ts, docs/MCP.md, test/mcp-branches.test.ts.
Risk: a tool that skips the page's gate. Never re-check permission in the tool; the action checks it.
For: the same action has the same shape for a person and an agent. Creating and deleting a branch (
branchCreateandbranchDeleteinsrc/web/pages/branches.ts) is a form on the page today and has no MCP tool, so an agent in Claude, ChatGPT or OpenCode has to fall back on raw HTTP.Done:
branchesinsrc/http/mcp.ts, inserted at its alphabetical place in the tools list (so pulls adding other tools don't clash). It callscreateBranch/deleteBranch, the same action the page calls, so the rules live in one place: the default branch is never deleted, names are validated, and only a writer may act.tools/liststays under the size budget (#3366).test/mcp-branches.test.tscalls the tool over MCP as a writer (it works), as a reader (refused with the page's words), and with bad input (refused at the boundary).docs/MCP.mdlists the tool.Files:
src/http/mcp.ts,docs/MCP.md,test/mcp-branches.test.ts. Risk: a tool that skips the page's gate. Never re-check permission in the tool; the action checks it.