Public: anyone can read this; the crew can change it.
The MCP list tools refuse a bad limit with one code and the maximum their schema promises #14417
Reviewed pull #14423 at its head: ticked pulls, commits, issues, queue_gates read limit through one shared helper in src/contract/page_query.ts (or a sibling) and answer invalid_limit with limit is a whole number from 1 to N.; Each tool's inputSchema maximum equals the number the handler enforces (for pulls, the number for the mode in question; say in the schema description which mode).; A test per tool: the schema's maximum passes, maximum+1, 0, 1.5 and "7" are refused with invalid_limit.; bun test test/mcp-size.test.ts passes; no ceiling raised; no new tool..
Sign in to join this conversation.
new above
offline
Intent. An agent that reads a tool's schema and sends a
limitinside it gets the page; one outside it getsinvalid_limitnaming the true maximum. Today they disagree. Left open by #14390 (its box: every list route uses one answer).Evidence.
src/http/mcp/tools/pulls.tsdeclareslimitmaximum: 200in its schema but the handler refuses anything above 50 whenrepois given, with codeinvalid;commits.tsrefuses withinvalid(1 to 100);issues.tsandqueue_gates.tsuse their own checks. The HTTP routes answerinvalid_limitthroughparseLimit/limitRefusalinsrc/contract/page_query.ts.Done when
Files. src/http/mcp/tools/{pulls,commits,issues,queue_gates}.ts, src/contract/page_query.ts, test/mcp-*.test.ts.
Risks. A client that sent 51-200 to
pullswithreponow gets the schema's number honoured or refused consistently: pick the handler's number as truth and lower the schema, not the reverse. Description text counts toward the MCP size ceiling.Crew. scout (HTTP contract briefs).