Title: Consider extensible pattern for protocol flow-control exceptions · Issue #1788 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Consider extensible pattern for protocol flow-control exceptions · Issue #1788 · modelcontextprotocol/python-sdk
X Title: Consider extensible pattern for protocol flow-control exceptions · Issue #1788 · modelcontextprotocol/python-sdk
Description: PR #1780 adds specific except UrlElicitationRequiredError: raise blocks in tool handlers to prevent this exception from being wrapped as a tool error. Per SEP-1036, UrlElicitationRequiredError is not a regular error—it's a protocol-level...
Open Graph Description: PR #1780 adds specific except UrlElicitationRequiredError: raise blocks in tool handlers to prevent this exception from being wrapped as a tool error. Per SEP-1036, UrlElicitationRequiredError is n...
X Description: PR #1780 adds specific except UrlElicitationRequiredError: raise blocks in tool handlers to prevent this exception from being wrapped as a tool error. Per SEP-1036, UrlElicitationRequiredError is n...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/issues/1788
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Consider extensible pattern for protocol flow-control exceptions","articleBody":"PR #1780 adds specific `except UrlElicitationRequiredError: raise` blocks in tool handlers to prevent this exception from being wrapped as a tool error.\n\nPer SEP-1036, `UrlElicitationRequiredError` is not a regular error—it's a protocol-level flow control mechanism equivalent to `elicitation/create`. It needs to propagate as a JSON-RPC error response.\n\nIf more continuation-style exceptions are added in the future, consider an attribute-based pattern:\n\n```python\nclass McpError(Exception):\n propagate_through_tool_handlers: bool = False\n\nclass UrlElicitationRequiredError(McpError):\n propagate_through_tool_handlers = True\n```\n\nFor now, YAGNI applies—we only have one such case.","author":{"url":"https://github.com/felixweinberger","@type":"Person","name":"felixweinberger"},"datePublished":"2025-12-15T17:56:58.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/1788/python-sdk/issues/1788"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:5d1490ce-5d89-3614-4256-2cad0f44f5a4 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BF3A:3AEFAE:1AC412:23D0C6:6A619FE1 |
| html-safe-nonce | 53d1d139cb629965b3600dcef5e742b24b390616c566958e2292b0c713eabcb3 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjNBOjNBRUZBRToxQUM0MTI6MjNEMEM2OjZBNjE5RkUxIiwidmlzaXRvcl9pZCI6IjIxMzYzNjg2MTM3MjUxNTEyMDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 55c6fd8be11d955183b183f9a6b0f7ae3b894cf4e8d01eafbf259df7f02d51e6 |
| hovercard-subject-tag | issue:3731529625 |
| github-keyboard-shortcuts | repository,issues,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/_view_fragments/issues/show/modelcontextprotocol/python-sdk/1788/issue_layout |
| twitter:image | https://opengraph.githubassets.com/80a92dc3fcea60c3b212e416b20028394021db896730742c7da0c4bf59d753fb/modelcontextprotocol/python-sdk/issues/1788 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/80a92dc3fcea60c3b212e416b20028394021db896730742c7da0c4bf59d753fb/modelcontextprotocol/python-sdk/issues/1788 |
| og:image:alt | PR #1780 adds specific except UrlElicitationRequiredError: raise blocks in tool handlers to prevent this exception from being wrapped as a tool error. Per SEP-1036, UrlElicitationRequiredError is n... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | felixweinberger |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6f4633bcf01c1ad14b73fd07dd39ac31d61f3d3c2578ee08ec1792b7b351eeb9 |
| turbo-cache-control | no-preview |
| 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 | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | ac296ae7f21856f1f92adbad22f870b6fbb4b907 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width