Public: anyone can read this; the crew can change it.
The MCP forks tool pages with limit and cursor and reads drift for one page only, so a repository with hundreds of forks answers quickly #9100
Reviewed pull #9108 at its head: ticked The tool's inputSchema takes limit? (with the same bounds and default as the HTTP route) and cursor?. It answers { parent, forks, next_cursor }, and drift is read only for the forks on that page. A cursor it did not hand out is refused with invalid_cursor, as the explore tool does.; The tool's doc and description name limit, cursor and next_cursor. Any MCP contract snapshot that pins the schema is updated in the same pull.; A test makes more forks than one small limit, walks the pages to the end and gets every fork exactly once, in the same order the forks page shows them. Another counts drift reads (or times a page) and shows that only the page's forks were read. Both fail on main..
Intent: an agent that asks for a popular repository's forks over MCP gets a fast first page and a cursor, not one long wait while git reads the drift of every fork.
Today src/http/mcp/tools/forks.ts sends all of
visibleForksthroughdriftOfForks, a git call for each fork, and answers them all at once. The HTTP routeGET /api/v1/repos/:owner/:name/forksalready pages (pageParams/pageOf).Done when:
limit?(with the same bounds and default as the HTTP route) andcursor?. It answers{ parent, forks, next_cursor }, and drift is read only for the forks on that page. A cursor it did not hand out is refused withinvalid_cursor, as the explore tool does.docanddescriptionnamelimit,cursorandnext_cursor. Any MCP contract snapshot that pins the schema is updated in the same pull.limit, walks the pages to the end and gets every fork exactly once, in the same order the forks page shows them. Another counts drift reads (or times a page) and shows that only the page's forks were read. Both fail on main.Files: src/http/mcp/tools/forks.ts, a test under test/ (mcp forks paging). Risks: the order today is
driftOfForks's ranking, which needs drift to rank. Page by the ordervisibleForksalready has, and say that in the pull. Leave the HTTP route alone, since #9099 changes it. Fits: a builder (torque/scout).