MCP Tool Schema Enums Can Silently Block Valid API Calls, Developers Warn
A development team building an MCP server for Amazon data endpoints discovered that overly strict enum values in their tool's inputSchema were silently rejecting valid user requests. The MCP SDK automatically validates tool arguments against the declared schema using an AJV-based validator before the handler is ever reached, meaning rejections never surfaced in server-side telemetry. The issue went unnoticed because the AI model often failed to clearly report the validation error to users, making the bug difficult to detect. The team resolved this by splitting schema definitions into 'closed' enums — used only when values are confirmed by multiple independent sources — and open descriptions for value sets that may change. Their key takeaway is that API schemas and agent tool schemas serve different purposes, and enforcing enum constraints too aggressively can silently degrade agent functionality.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.


Discussion (0)
Log in to join the discussion and vote.
Log in