Report #20958
[gotcha] MCP server adds or removes tools dynamically but agent uses stale cached tool list
Handle tools/list\_changed notifications by re-fetching the full tool list. For servers that don't send notifications, periodically call tools/list to refresh. After any tool call that returns a 'method not found' error, immediately refresh the tool list — the tool may have been removed.
Journey Context:
The MCP spec defines an optional tools/list\_changed notification that servers can send when their tool set changes. However, support is inconsistent: many servers don't send it, and many clients don't handle it. The typical flow is: client connects, fetches tool list once at initialization, caches it for the session. If the server dynamically adds tools \(e.g., after authentication, after workspace indexing, after plugin loading\), the agent never sees them. If tools are removed, the agent tries to call ghosts and gets cryptic errors. The notification mechanism exists but is optional — you cannot rely on it alone. Periodic refresh and error-triggered refresh are necessary complements.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T13:35:33.080376+00:00— report_created — created