You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
The maxToolInputElements refusal lacks the Input validation error: prefix that the schema refusal carries #3111
Version: @modelcontextprotocol/sdk 1.32.2 (the same text is in packages/server/src/server/mcp.ts on main).
McpServer.validateToolInput refuses a tool call in two ways. Both are McpError(ErrorCode.InvalidParams, …), and the tools/call handler returns either one as an isError: true result:
arguments over maxToolInputElements: Invalid arguments for tool start_run: arguments contain more than the maximum of 50000 elements
arguments that fail the input schema: Input validation error: Invalid arguments for tool get_run_state: Invalid input: expected string, received number at run_id
A client or a log filter that recognises an input refusal by its Input validation error: prefix misses the first one. Yet both are the same kind of refusal: bad arguments, same error code.
Suggestion: give the size refusal the same prefix: Input validation error: Invalid arguments for tool start_run: arguments contain more than the maximum of 50000 elements
Context: we set maxToolInputElements: 50_000 in Realm's MCP server (thank you for #2926/#2927), and we document both texts for our users.
Related: #2879 asks for a hook to shape the schema refusal's result; if it lands, the size refusal could go through the same hook.
Activity
barry166 commentedon Oct 27, 2026
I can take this. I’ll add the consistent input-validation prefix and a focused regression test.
mihai-r-lupu commentedon Oct 27, 2026
Thanks!