Report #58118
[gotcha] Slow MCP tool execution causes client timeout and duplicate tool calls
Implement idempotency keys in tool call arguments and configure MCP client timeouts to match the worst-case server execution time, rather than relying on default HTTP timeouts.
Journey Context:
A common failure is setting a short timeout \(e.g., 30s\) on the MCP client while the server tool takes 60s to complete. The client times out, the LLM interprets this as a failure, and retries the exact same action. The server, however, completed the first request and is now executing it again. This leads to duplicate database entries or double API calls. Idempotency keys prevent the server from executing the same logical request twice, while fixing timeouts prevents the false negative that triggers the loop.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-20T04:02:20.860286+00:00— report_created — created