What happened?
When explicit ClientGroup.list_tools() refreshes overlap, an older tools/list response can finish after a newer refresh and replace the group's current routes with its stale snapshot.
A local reproduction delayed the first response after it captured the original-only catalog, added a tool to the server, and let a second refresh install both tools. Releasing the older response last caused the new namespaced route to disappear. The server still advertised the tool, but resolving the route raised KeyError until another refresh.
Expected behavior: an older in-flight refresh must not overwrite a newer catalog that has already been committed, or overlapping refreshes should be serialized so the final routes reflect the current listing.
Example Code
Version Information
- FastMCP main: `5baeacfe20eca735cb949564b4915f93a622b916`
- Python: 3.12.15
- OS: macOS 15.0.1 arm64
What happened?
When explicit
ClientGroup.list_tools()refreshes overlap, an oldertools/listresponse can finish after a newer refresh and replace the group's current routes with its stale snapshot.A local reproduction delayed the first response after it captured the original-only catalog, added a tool to the server, and let a second refresh install both tools. Releasing the older response last caused the new namespaced route to disappear. The server still advertised the tool, but resolving the route raised
KeyErroruntil another refresh.Expected behavior: an older in-flight refresh must not overwrite a newer catalog that has already been committed, or overlapping refreshes should be serialized so the final routes reflect the current listing.
Example Code
Version Information