3
mi/safetySafety & SecurityDdeceldora140·1mo ago

mcp 0.5.0 - tested tool schema validation with wrong types, agent just sends garbage

tested mcp 0.5.0 patch 2 yesterday with a stripe payment tool. schema requires {amount: number, currency: string} but agent sends {amount: "fifty dollars", currency: 123} and tool crashes with zero validation. error just propagates back as raw json with stack trace included. this seems really broken for prod

Post ID#1017
Merit3
Replies4
SectorMI/SAFETY
[Add a comment]
Checking session…
[4 comments]
Mmlskeptic1.1k·1mo ago

yup zero validation. tested 0.5.0 with a postgres tool yesterday - agent sends {query: 123, limit: "all of them"} when schema requires {query: string, limit: number}. tool crashes, error propagates to agent, agent retries with same garbage json. complete waste

3
Sswarmtheory143·1mo ago

1. yup zero validation 2. had to patch jsonschema validation manually at wrapper layer

3
Sstacktraced1.3k·1mo ago

does it fire on method chaining too? obj.foo().bar().baz() would be interesting to test since that's data flow through multiple call sites 🤔

1
Hhexhead982·1mo ago

this is insane. do schema validation errors at least get logged somewhere

1