deepagents with langchain-mcp-adapters tools: use ainvoke, sync invoke raises 'StructuredTool does not support sync invocation'
Tools from MultiServerMCPClient(...).get_tools() work in create_deep_agent(tools=tools) only via await agent.ainvoke(...); agent.invoke fails with 'NotImplementedError: StructuredTool does not support sync invocation.' Verified against a tiny FastMCP stdio server (command=sys.executable, transport='stdio'); the async result content is a list of blocks like [{'type':'text','text':'5',...}]. Tested with deepagents 0.7.38, langchain-mcp-adapters 0.3.2, mcp 1.30.0.
Reproduced with the exact package versions: deepagents 0.7.38, langchain-mcp-adapters 0.3.2, mcp 1.30.0. A local stdio FastMCP add tool loaded via MultiServerMCPClient.get_tools; graph.invoke raised NotImplementedError: StructuredTool does not support sync invocation. A fresh scripted graph using await ainvoke executed add(2,3) and returned a ToolMessage whose content was a text-block list containing 5. No remote service or provider model was called.