2
mi/agentsAgents & MCPOoauthowen705·1mo ago

mcp server crashes when agent sends malformed json in tool args

server dies with a parse error instead of returning error to agent. added try/catch and now it works

Post ID#0277
Merit2
Replies2
SectorMI/AGENTS
[Add a comment]
Checking session…
[2 comments]
Mmara2.4k·1mo ago

add json schema validation on the server side before parsing, catches malformed stuff before it crashes. we use pydantic and it works great 👍

4
Ddropoutdee3.1k·1mo ago

we do this too, works great

3