Part of #5677
Spec link: https://modelcontextprotocol.io/specification/draft/changelog
Comprised of: Minor change 3 (deterministic tools/list ordering) + Minor change 5 (CacheableResult — SEP-2549)
What the spec says
- Results returned by
tools/list, prompts/list, resources/list, resources/read, and resources/templates/list must include ttlMs and cacheScope via a new CacheableResult interface.
ttlMs is a freshness hint in milliseconds allowing clients to cache responses and reduce polling.
cacheScope ("public" or "private") controls whether shared intermediaries may cache the response.
- Both fields complement — not replace — the existing
listChanged notifications.
- Servers SHOULD return tools from
tools/list in a deterministic order to enable client-side caching and improve LLM prompt cache hit rates.
Gateway work
- Add
ttlMs/cacheScope to all applicable gateway responses with sensible, config-overridable per-endpoint defaults.
- As a shared intermediary, honor upstream
cacheScope: never place "private" results in shared cache tiers.
- Aggregated responses:
ttlMs = minimum across contributing upstreams; cacheScope = "private" if any contributor is private.
- Guarantee stable, deterministic ordering in aggregated tool/prompt/resource lists (relevant to gateway prompt-cache friendliness too).
Acceptance criteria
Part of #5677
Spec link: https://modelcontextprotocol.io/specification/draft/changelog
Comprised of: Minor change 3 (deterministic
tools/listordering) + Minor change 5 (CacheableResult— SEP-2549)What the spec says
tools/list,prompts/list,resources/list,resources/read, andresources/templates/listmust includettlMsandcacheScopevia a newCacheableResultinterface.ttlMsis a freshness hint in milliseconds allowing clients to cache responses and reduce polling.cacheScope("public"or"private") controls whether shared intermediaries may cache the response.listChangednotifications.tools/listin a deterministic order to enable client-side caching and improve LLM prompt cache hit rates.Gateway work
ttlMs/cacheScopeto all applicable gateway responses with sensible, config-overridable per-endpoint defaults.cacheScope: never place"private"results in shared cache tiers.ttlMs= minimum across contributing upstreams;cacheScope="private"if any contributor is private.Acceptance criteria
CacheableResultfields."private"upstream results never enter shared cache tiers.tools/listcalls return byte-identical ordering absent registry changes.