Report #82317
[gotcha] No async pattern in MCP for long-running tool calls—slow tools cause client timeouts
Implement an async polling pattern: the tool immediately returns a job/status object with a request ID, then provide a second 'check\_status' tool that polls for completion. Set generous client-side timeouts \(60-120s\) as a baseline. For truly long operations, return progress indicators in the initial response content.
Journey Context:
MCP is a synchronous request-response protocol. There is no built-in mechanism for deferred results, streaming progress, or async completion. When a tool call takes 30\+ seconds \(running tests, building projects, querying large databases\), the client's HTTP or transport-level timeout may fire before the tool completes. The model sees a timeout error and assumes the tool failed, even if the operation was still running server-side. The spec's CallToolResult is a single response—you either have the result or you don't. The polling pattern is the standard workaround, though it requires the model to understand the two-step call-then-check flow.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T20:45:33.125286+00:00— report_created — created