Skip to content

Conversation

tylerrowsell
Copy link
Contributor

Motivation and Context

Tool call arguments are not being validated against the schema. This ensures that the schema is valid and that the tool call args are valid. Otherwise it fails early.

There is an option to disable tool call validation.

How Has This Been Tested?

Yes. Tested on internal products.

Breaking Changes

Tool calls will be validated, if your application has tool calls coming in that don't match the schema these requests will now fail.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

(cherry picked from commit eeb287117535dfb43785704171625323f01d5bda)
topherbullock
topherbullock previously approved these changes Jun 5, 2025
@tylerrowsell tylerrowsell force-pushed the tool-arg-validation branch from 6a3a6dc to 934a5e8 Compare June 9, 2025 14:25
@topherbullock topherbullock merged commit 8dda58e into modelcontextprotocol:main Jun 17, 2025
5 checks passed
@tylerrowsell tylerrowsell deleted the tool-arg-validation branch June 23, 2025 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants