Title: feat(types): add SEP-2549 cache hints to result models by MicroYui · Pull Request #2824 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: feat(types): add SEP-2549 cache hints to result models by MicroYui · Pull Request #2824 · modelcontextprotocol/python-sdk
X Title: feat(types): add SEP-2549 cache hints to result models by MicroYui · Pull Request #2824 · modelcontextprotocol/python-sdk
Description: Summary Implements SEP-2549 cache hints for Python SDK protocol result models. Adds ttlMs and cacheScope support to: ListToolsResult ListPromptsResult ListResourcesResult ListResourceTemplatesResult ReadResourceResult The SDK defaults to ttlMs=0 and cacheScope="public" so existing Python code constructing these models remains usable while serialized responses include the new cache hint fields. Older server responses that omit the fields also parse with those defaults. This PR does not implement client-side caching, cache invalidation logic, or new high-level MCPServer cache configuration APIs. Fixes #2802. Tests uv run --frozen pytest tests/test_types.py -q uv run --frozen pytest tests/server/lowlevel/test_server_listing.py tests/interaction/lowlevel/test_wire.py tests/server/mcpserver/test_server.py -q uv run --frozen pytest tests/interaction/test_coverage.py tests/interaction/lowlevel/test_wire.py -q uv run --frozen ruff format --check . uv run --frozen ruff check . uv run --frozen pyright --pythonplatform Linux
Open Graph Description: Summary Implements SEP-2549 cache hints for Python SDK protocol result models. Adds ttlMs and cacheScope support to: ListToolsResult ListPromptsResult ListResourcesResult ListResourceTemplatesResu...
X Description: Summary Implements SEP-2549 cache hints for Python SDK protocol result models. Adds ttlMs and cacheScope support to: ListToolsResult ListPromptsResult ListResourcesResult ListResourceTemplatesResu...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2824
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:10c0e81a-ff1e-361b-7f83-538d8adeca47 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | E54A:256587:289A23:3A1B11:6A59D7B9 |
| html-safe-nonce | ec0a834aaff5f574353c4446d400c66e495bf0286fc303c997998b7ba5067214 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFNTRBOjI1NjU4NzoyODlBMjM6M0ExQjExOjZBNTlEN0I5IiwidmlzaXRvcl9pZCI6IjUzOTU2NTA2OTU3MTc4MzY3MzAiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a4090db3846a71f5cb27ded32c572aaadcfc67c2f218fd61be171ba4224237c2 |
| hovercard-subject-tag | pull_request:3832868114 |
| github-keyboard-shortcuts | repository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/modelcontextprotocol/python-sdk/pull/2824/files |
| twitter:image | https://avatars.githubusercontent.com/u/116134558?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/116134558?s=400&v=4 |
| og:image:alt | Summary Implements SEP-2549 cache hints for Python SDK protocol result models. Adds ttlMs and cacheScope support to: ListToolsResult ListPromptsResult ListResourcesResult ListResourceTemplatesResu... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | ba3976babb66479b1c943a8edc0777d96157da48fadc0161f9ddb219deee8353 |
| turbo-cache-control | no-preview |
| diff-view | unified |
| go-import | github.com/modelcontextprotocol/python-sdk git https://github.com/modelcontextprotocol/python-sdk.git |
| octolytics-dimension-user_id | 182288589 |
| octolytics-dimension-user_login | modelcontextprotocol |
| octolytics-dimension-repository_id | 862584018 |
| octolytics-dimension-repository_nwo | modelcontextprotocol/python-sdk |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 862584018 |
| octolytics-dimension-repository_network_root_nwo | modelcontextprotocol/python-sdk |
| turbo-body-classes | logged-out env-production page-responsive full-width |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | bfacf98c3b7ad151665d6ddd216469389872b251 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width