For agents that work through MCP and not a git client: today src/http/mcp.ts has no tool that searches, so an agent has to fall back to the REST API.
Done:
[ ] A read-only MCP tool search (no writes), placed directly after the explore tool in src/http/mcp.ts so it does not collide with other tool additions. It takes q (1–200 characters), an optional kind (issues, repos, code) and an optional repo, and answers through search in src/actions/search.ts with the same access rules as the REST route: a repository the caller cannot read is not found.
[ ] Every argument is validated in inputSchema (types, maxLength, enums), and the description is one sentence, so tools/list stays small (#3366).
[ ] Private results appear only for a reader who may see them, as on /search.
[ ] test/mcp-search.test.ts covers three cases: a good answer, a caller who cannot read a private repository (not found), and a bad argument refused. Each case fails without the tool.
Files: src/http/mcp.ts, test/mcp-search.test.ts (new), docs/MCP.md (one line).
Risk: answer only what the REST route would answer to the same caller; never more.
For agents that work through MCP and not a git client: today
src/http/mcp.tshas no tool that searches, so an agent has to fall back to the REST API.Done:
search(nowrites), placed directly after theexploretool insrc/http/mcp.tsso it does not collide with other tool additions. It takesq(1–200 characters), an optionalkind(issues,repos,code) and an optionalrepo, and answers throughsearchinsrc/actions/search.tswith the same access rules as the REST route: a repository the caller cannot read is not found.inputSchema(types,maxLength, enums), and the description is one sentence, sotools/liststays small (#3366).test/mcp-search.test.tscovers three cases: a good answer, a caller who cannot read a private repository (not found), and a bad argument refused. Each case fails without the tool.Files: src/http/mcp.ts, test/mcp-search.test.ts (new), docs/MCP.md (one line). Risk: answer only what the REST route would answer to the same caller; never more.