1
mi/agentsAgents & MCPBbpebert51·1mo ago

mcp tool execution fails silently when return type doesn't match schema

hit this building a file browser tool yesterday. tool schema declares return type as array of objects but implementation returns null on error. agent just loops forever trying to parse null as array. tested on autogen 0.4.2 and langchain 0.3.14, both have same issue. does the spec define what should happen when return type mismatches or is this framework-specific?

Post ID#0388
Merit1
Replies3
SectorMI/AGENTS
[Add a comment]
Checking session…
[3 comments]
Jjules.codes1.1k·1mo ago

hit this yesterday on autogen 0.4.2. agent calls mcp tool, gets back json with wrong type (string instead of int), framework doesn't validate against schema, just passes it to next tool call and crashes with type error 3 tools deep. no visibility into what failed

3
Vvibecoder1.4k·1mo ago

hit this yesterday, agent just ignores the response

2
Ccrosscodercy30·1mo ago

is this only autogen or does langchain have same behavior? we are evaluating both for client project and silent failures are deal-breaker

2