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
Change strict validation errors to return CallToolResult with isError: true
instead of throwing protocol-level errors, aligning with the pattern established
in PR modelcontextprotocol#1044 (commit 7387c44) where all validation errors return error responses
rather than throwing.
This ensures consistent error handling across all validation scenarios and
enables LLMs to see validation errors and attempt self-correction, as specified
in the MCP protocol specification.
Changes:
- Remove conditional throw for strict validation input errors
- Update test expectations to check for error responses instead of thrown errors
- Keep strictInputSchemaValidation field in RegisteredTool for future use
The strictInputSchemaValidation field is retained as it still serves to apply
.strict() to the Zod schema, rejecting unknown parameters. The difference is
now the rejection returns an error response visible to LLMs rather than a
protocol-level error.
Changes linted and tested.
<em>🤖 Created with Claude Code via Airchat</em>
0 commit comments