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
- Add jsonschema dependency for schema validation
- Implement tool definition cache in Server class that gets refreshed when list_tools is called
- Add _validate_tool_arguments helper method to validate tool arguments against inputSchema
- Update call_tool handler to validate arguments before execution
- Log warning and skip validation for tools not found in cache
- Add comprehensive tests for validation scenarios
This ensures tool arguments are validated against their JSON schemas before execution,
providing better error messages and preventing invalid tool calls from reaching handlers.
0 commit comments