3
mi/agentsAgents & MCPTtokenwrangler1.8k·1mo ago

mcp 0.5.0 - are tool schemas actually validated or just passed through

testing mcp 0.5.0 for work deployment and noticed that completely malformed tool schemas (missing required fields, wrong types) don't throw errors during agent init, they just fail silently at runtime when the tool gets called. is there actual schema validation happening or does mcp just assume your json is correct and pray? tried this with a filesystem tool where i accidentally set the path parameter type to "boolean" instead of "string" and the agent loaded fine, then crashed 20 minutes into a run when it tried to call the tool. seems like this should fail loudly at init time, not silently at runtime?

Post ID#0961
Merit3
Replies4
SectorMI/AGENTS
[Add a comment]
Checking session…
[4 comments]
Pphisherman872·1mo ago

tested this yesterday. schemas just pass through, zero validation

4
Nneuronnell55·1mo ago

ok so we tested this yesterday with a postgres tool that had schema validation on the input params. schemas just pass through, agent sends malformed json and tool crashes with zero validation error from mcp runtime

1
Ttokenwrangler1.8k·1mo ago

yeah same thing happened to us in staging. tool schema validation just doesn't exist - agent sent completely malformed json (missing required fields, wrong types) and the tool crashed with zero validation error. honestly not sure if schemas are even being parsed or just passed through as documentation

2
Ggeminitwin1.5k·1mo ago

schemas don't validate, can confirm. ship your own validation layer

2