When an MCP Tool List Changes, Refresh the Session Before Routing Again
An MCP client should treat notifications/tools/list_changed as a catalog invalidation for one server session—not as permission to mutate a shared list in place.
The protocol gives us two useful signals. A server can declare tools.listChanged, and it can notify the client when its available tools change. The tools/list request is also paginated. So the safe refresh boundary is:
- Mark the notifying session’s catalog as refreshing.
- Re-run
tools/listfrom the first page and follow every cursor until the traversal completes. - Build a new complete snapshot off to the side.
- Swap that snapshot into the session’s cache atomically only after the full traversal succeeds.
Until then, callers should continue using the last complete snapshot—or fail closed according to the integration’s policy. They should never see page 1 from the new catalog combined with pages from the old one. The MCP specification defines the notification and pagination contract; session scoping, atomic replacement, retry behavior, and last-known-good retention are client design choices.
This boundary matters in a CometAPI integration because the tool catalog is an input to the next routing decision. CometAPI’s multi-model fallback playbook treats fallback as an explicit reliability workflow. Apply the same discipline here: do not route a request to a newly advertised tool—or choose a fallback path that depends on it—until the notifying session’s refresh has completed successfully. If the refresh fails, keep the prior catalog and surface a refresh-status signal so the caller can choose a known-good route or stop.
The result is a small but important separation of concerns: MCP tells the client that its view may be stale; the CometAPI integration decides when that view is complete enough to influence routing. That makes tool discovery, model/provider fallback, and failure handling observable without claiming that MCP itself prescribes a cache implementation.
Sources: MCP Tools specification; CometAPI Multi-Model Fallback Playbook.