Slow MCP tool calls: keep tool responses under a few seconds
Shipyard warns above 3 seconds and fails above 15 seconds per fixture call. Cache hot queries, cap result size and return a job id for long work.
Keep each tool call under about 3 seconds. The rule latency.tool-call is a major finding for Claude and ChatGPT: a fixture call over 3,000 ms warns, and over 15,000 ms fails.
What you see
- A scan reports
latency.tool-callper tool: "<tool> took 4200 ms". - The timings come from the fixture calls the scan made. A tool without a fixture is not timed by this rule.
Why it happens
- A cold start in a serverless function adds seconds to the first call.
- An unindexed query or an N+1 loop over line items.
- A synchronous upstream call to a slow carrier or payment API.
- A large result: the time includes serialising and sending it. See
output.response-size.
The rule's fix text says slow tools time out in chat clients and that ChatGPT may remove apps for slow, unreliable behaviour (ChatGPT guidelines 1.2 and 1.5). The exact client timeout values are not verified here; the MCP spec says clients SHOULD implement timeouts for tool calls without giving a number.
Check it yourself
curl -s -o /dev/null -w 'total %{time_total}s, first byte %{time_starttransfer}s\n' -X POST https://mcp.acme.example/mcp \
-H 'Content-Type: application/json' \
-H 'Accept: application/json, text/event-stream' \
-H "Authorization: Bearer $TOKEN" \
-d '{"jsonrpc":"2.0","id":1,"method":"tools/call","params":{"name":"list_orders","arguments":{"limit":10}}}'
Run it three times. A slow first call and fast later calls point to a cold start.
Fix
- Keep one instance warm, or move initialisation out of the request path.
- Add indexes, batch queries and cache hot lookups.
- Cap page size (
schema.limit-unbounded). - For work that takes longer than a few seconds, return a job id from
start_exportand let the model pollget_export_status. - Set your own upstream timeouts so a slow carrier returns a clear error (see
errors.unhelpful-message) instead of hanging.
Verify
Repeat the curl timing and re-scan. Also look at latency.handshake.
Which clients care
Claude and ChatGPT, per the rule.
Source
OpenAI plugin guidelines: https://developers.openai.com/plugins/plugin-guidelines
Run a free scan at https://mcpshipyard.com/scan to check every rule at once.
Check every rule at once
A free scan runs this check and the other 152 against your live URL.