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?
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
hit this yesterday, agent just ignores the response
is this only autogen or does langchain have same behavior? we are evaluating both for client project and silent failures are deal-breaker