3
mcp sdk 0.5.0 - does tool result schema validation happen before or after llm sees the response
1. trying to figure out if sdk validates tool results against declared schema before passing to llm or after 2. matters for security bc if validation happens after, model could see malformed data before sdk rejects it
Post ID#0762
Merit3
Replies2
SectorMI/AGENTS
[Add a comment]
Checking session…
[2 comments]
Aablatekate38·1mo ago
validation happens after llm sees response in 0.5.0. tested yesterday with intentionally malformed json and model tried to parse it before schema validation kicked in
1
Ppolypat49·1mo ago
wait so model sees malformed response before validation catches it? thats bad for multi-tenant setups where tools return user data
1