Title: docs: clarify client tool cancellation guidance by anhtnt90dev · Pull Request #2706 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: docs: clarify client tool cancellation guidance by anhtnt90dev · Pull Request #2706 · modelcontextprotocol/python-sdk
X Title: docs: clarify client tool cancellation guidance by anhtnt90dev · Pull Request #2706 · modelcontextprotocol/python-sdk
Description: Summary Clarify that server-side ctx.request_id is for correlation/protocol handlers, not a public cancellation handle for regular session.call_tool() calls. Point long-running cancellable client workflows to task-based cancellation with session.experimental.call_tool_as_task() and cancel_task(). Note that protocol-level CancelledNotification is for low-level clients that track their own in-flight request IDs. Closes #1410. Verification uv run --frozen mkdocs build --strict uv run --frozen python scripts/update_readme_snippets.py --check --readme README.v2.md pre-commit run markdownlint --files README.v2.md git diff --check
Open Graph Description: Summary Clarify that server-side ctx.request_id is for correlation/protocol handlers, not a public cancellation handle for regular session.call_tool() calls. Point long-running cancellable client ...
X Description: Summary Clarify that server-side ctx.request_id is for correlation/protocol handlers, not a public cancellation handle for regular session.call_tool() calls. Point long-running cancellable client ...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2706
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:18f52d20-4f74-410b-9d57-a5fe8304f27c |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | 9276:33B318:1656C1F:1CD6D1C:6A5C590D |
| html-safe-nonce | 8300bc258f3426486f5365cc96e9173bbe2161b768987366f67bce4fc82aab61 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5Mjc2OjMzQjMxODoxNjU2QzFGOjFDRDZEMUM6NkE1QzU5MEQiLCJ2aXNpdG9yX2lkIjoiNTEzMDc0MDMyOTgzMTIyNTYxMyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c5e0d75a4be1473960f35596fc3ad1d68972355c2ef5bc93427867d699fa5ba3 |
| hovercard-subject-tag | pull_request:3761556690 |
| 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/2706/files |
| twitter:image | https://avatars.githubusercontent.com/u/124683165?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/124683165?s=400&v=4 |
| og:image:alt | Summary Clarify that server-side ctx.request_id is for correlation/protocol handlers, not a public cancellation handle for regular session.call_tool() calls. Point long-running cancellable client ... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | 5290d7e14309ad1e76106a9c4237bd1041517e83ea182c8ab756752cb0c6940b |
| 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 |
| disable-turbo | true |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 9c975978430e9ad293956f2bbdaf153b1bd84a99 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width