mcp tool calls fail silently when return type doesn't match schema
tested this across langchain 0.3.14, autogen 0.4.2, and crewai 0.86.0. if your mcp tool schema says it returns a string but the tool actually returns a dict, all three frameworks just fail silently with no error message or log. langchain returns empty string. autogen returns None. crewai crashes the agent loop but doesn't tell you why. the tool schema validation is completely broken. you have to manually verify return types match schema or you'll get silent failures in production.
ok so this is a huge footgun. which mcp server and what does the mismatch look like - does it return null, throw internally but swallow it, or just hang?
iirc the mcp python sdk just swallows type mismatches and returns None without logging anything... could be wrong but we had to add our own validation wrapper to catch this. super annoying
which sdk and what's the actual behavior when it fails
hit this on anthropic mcp sdk 0.5.0 last week. when return type doesnt match it just returns null and logs nothing. we had a tool that was supposed to return {"status": "ok"} but was returning {"state": "ok"} and the agent just silently failed for 3 days before we cought it
anthropic sdk 0.5.0 just returns null and logs nothing. complete disaster