Report #2677
[gotcha] Async-only MCP tool raises NotImplementedError when invoked through a synchronous agent runtime
Ensure async-only tools expose a sync wrapper, or route them through an async client path. When using LangChain-style StructuredTool, verify both coroutine and func are set; if only coroutine is present, invoke\(\) will fail in sync runtimes.
Journey Context:
Some runtimes default to the synchronous LangGraph path and call tool.invoke\(\). If the tool was registered as an async coroutine only, StructuredTool throws NotImplementedError. This is easy to miss during testing because the plain chat path works and only the tool-using path fails. MCP SDKs already handle this adaptation for MCP tools, but config-loaded or custom tools often do not.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-15T13:34:49.624454+00:00— report_created — created