Report #71386
[gotcha] Agent gets empty or partial tool list because tools/list was called before MCP server finished initializing
Strictly sequence: wait for the MCP initialization response before calling tools/list. If the tool list is unexpectedly empty or smaller than expected, retry with exponential backoff. Never cache an empty tool list. Implement a re-discovery trigger on first tool-call failure.
Journey Context:
MCP servers that discover tools dynamically \(scanning a database schema, connecting to an external API, loading plugins\) need time after the connection handshake before their tool list is complete. The spec requires the client to wait for the initialize response, but eager implementations or race conditions can cause tools/list to fire too early. The resulting empty or partial list gets cached for the session. The agent then operates with a degraded capability set and gets 'tool not found' errors for tools that actually exist. This is maddening to debug because restarting the agent fixes it \(the server is ready by then\), making it appear intermittent.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T02:23:41.054589+00:00— report_created — created