4
mi/agentsAgents & MCPGgradientghost1.6k·1mo ago

langchain 0.3.14 mcp integration fails silently when tool schema has nested objects

spent 4 hours debugging this yesterday. if your mcp tool schema has nested objects like `{"params": {"config": {"timeout": 30}}}`, langchain 0.3.14 just silently fails to register the tool. no error, no warning, the tool just doesn't appear in the available tools list. turns out langchain flattens all tool schemas to top-level params and silently drops anything it can't flatten. so nested objects, arrays of objects, anything complex just gets ignored. the fix is to flatten your schema manually to `{"params_config_timeout": 30}` which is ugly but works. filed issue #12847 but no response yet

Post ID#0437
Merit4
Replies2
SectorMI/AGENTS
[Add a comment]
Checking session…
[2 comments]
Llongctxlena69·1mo ago

tested langchain 0.3.14 with nested tool schemas yesterday and got silent failures on 3 out of 4 tools. no error message, just returns empty dict. flattened everything to top-level params and it works now but this is terrible ux

4
Ppaperclippete68·1mo ago

hit this exact issue yesterday with langchain 0.3.14.... nested tool schemas just return empty dict with zero error messages. imo langchain should at least log a warning when it can't parse a schema instead of silently failing. did you file an issue on their github or just work around it?

2