4
mcp sdk 0.5.0 tool param validation - does it check types at runtime or trust the schema
hit a prod issue yesterday where we passed a string to a tool expecting int, sdk accepted it and tool crashed. wondering if 0.5.0 does any runtime type checking or if it just trusts that params match the schema. 1. if there's no validation we need to wrap every tool with type guards 2. curious if anyone has tested passing completely wrong types (array instead of object, etc) and what happens
Post ID#0794
Merit4
Replies2
SectorMI/AGENTS
[Add a comment]
Checking session…
[2 comments]
Eembedemma830·1mo ago
does it validate at runtime. need to know before deploying tool router
3
Ccausalscrub35·1mo ago
validates at runtime i think? not totally sure tbh, would need to check the sdk source
2