Skip to content

[Server] Stop a retried resources/read from leaving out its caching hints - #667

Merged
chr-hertel merged 1 commit into
modelcontextprotocol:mainfrom
chr-hertel:fix-retried-read-cache-hints
Nov 5, 2026
Merged

chr-hertel merged 1 commit into
modelcontextprotocol:mainfrom
chr-hertel:fix-retried-read-cache-hints

Conversation

@chr-hertel

Copy link
Copy Markdown
Member

The result of a retried resources/read left out ttlMs and cacheScope, so the TS SDK client refuses it with Invalid result for resources/read. The spec requires the hints on every complete read and forbids caching a retry, so it now always carries ttlMs: 0 and cacheScope: private, also over hints its handler set.

Spotted with #665 - its TS client test can cover resources/read once both are in.

@chr-hertel chr-hertel added breaking change Breaking the Backwards Compatibility Promise Server Issues & PRs related to the Server component bug Something isn't working labels Nov 5, 2026
@chr-hertel
chr-hertel merged commit ce46033 into modelcontextprotocol:main Nov 5, 2026
28 checks passed
@chr-hertel
chr-hertel deleted the fix-retried-read-cache-hints branch November 5, 2026 00:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change Breaking the Backwards Compatibility Promise bug Something isn't working Server Issues & PRs related to the Server component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant