Title: Relax monolith ElicitRequestURLParams.elicitation_id for 2026-07-28 by maxisbey · Pull Request #2913 · modelcontextprotocol/python-sdk · GitHub
Open Graph Title: Relax monolith ElicitRequestURLParams.elicitation_id for 2026-07-28 by maxisbey · Pull Request #2913 · modelcontextprotocol/python-sdk
X Title: Relax monolith ElicitRequestURLParams.elicitation_id for 2026-07-28 by maxisbey · Pull Request #2913 · modelcontextprotocol/python-sdk
Description: Follow-up to #2912, addressing the two review comments that landed after merge. Motivation and Context #2912 re-vendored the 2026-07-28 draft schema, which dropped elicitationId from ElicitRequestURLParams and made CancelledNotificationParams.requestId required again. The regenerated v2026_07_28 surface package picked both up correctly, but the version-superset monolith in _types.py wasn't relaxed to match. As a result parse_server_result("tools/call", "2026-07-28", ...) would reject a spec-valid InputRequiredResult carrying a URL-mode elicitation at the monolith step (the ElicitRequest arm fails for missing elicitationId). What changed src/mcp/types/_types.py: ElicitRequestURLParams.elicitation_id is now str | None = None with a version note. The v2025_11_25 surface package still requires it on the wire, so 2025 callers are unchanged. Same superset pattern CancelledNotificationParams.request_id already uses. src/mcp/types/_types.py: CancelledNotificationParams.request_id docstring updated to note that 2026-07-28 makes the field required again and narrows it to client-issued requests. tests/types/test_methods.py: new test pinning that a 2026 InputRequiredResult with a URL elicit (no elicitationId) parses through both steps. tests/interaction/lowlevel/test_elicitation.py: capture-list type widened to list[str | None] to match the relaxed field. The elicit_url / send_elicit_complete helper signatures in peer.py / server/session.py / server/mcpserver/context.py are intentionally not touched here; those are 2025-11-25 API and version-gating them belongs with #2898 / #2904. How Has This Been Tested? pyright, ruff, ./scripts/test (full suite, 100% coverage, strict-no-cover clean). The new test in tests/types/test_methods.py is the repro from the review comment. Breaking Changes mcp.types.ElicitRequestURLParams can now be constructed without elicitation_id. Existing constructors that pass it are unaffected. Types of changes Bug fix (non-breaking change which fixes an issue) New feature (non-breaking change which adds functionality) Breaking change (fix or feature that would cause existing functionality to change) Documentation update Checklist I have read the MCP Documentation My code follows the repository's style guidelines New and existing tests pass locally I have added appropriate error handling I have added or updated documentation as needed AI Disclaimer
Open Graph Description: Follow-up to #2912, addressing the two review comments that landed after merge. Motivation and Context #2912 re-vendored the 2026-07-28 draft schema, which dropped elicitationId from ElicitRequestU...
X Description: Follow-up to #2912, addressing the two review comments that landed after merge. Motivation and Context #2912 re-vendored the 2026-07-28 draft schema, which dropped elicitationId from ElicitRequestU...
Opengraph URL: https://github.com/modelcontextprotocol/python-sdk/pull/2913
X: @github
Domain: github.com
| route-pattern | /:user_id/:repository/pull/:id/files(.:format) |
| route-controller | pull_requests |
| route-action | files |
| fetch-nonce | v2:78ad4024-2c4c-74fc-acbe-6ff10c729199 |
| current-catalog-service-hash | ae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b |
| request-id | A2E0:5AB97:50921D:6F5057:6A5A4E39 |
| html-safe-nonce | 0a7b293834e93199ab019c6fe2fd7bd9fdf4b78cf4d29095b6fa5c77bdb7f0c9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBMkUwOjVBQjk3OjUwOTIxRDo2RjUwNTc6NkE1QTRFMzkiLCJ2aXNpdG9yX2lkIjoiNzMxMTY0ODU1MTQ5NDg5NzIxMCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9900c0a04a6d4ce6e0e32eb9f4be231d193356f9673f949d0138cf4be1ba321b |
| hovercard-subject-tag | pull_request:3899392746 |
| 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/2913/files |
| twitter:image | https://avatars.githubusercontent.com/u/224885523?s=400&v=4 |
| twitter:card | summary_large_image |
| og:image | https://avatars.githubusercontent.com/u/224885523?s=400&v=4 |
| og:image:alt | Follow-up to #2912, addressing the two review comments that landed after merge. Motivation and Context #2912 re-vendored the 2026-07-28 draft schema, which dropped elicitationId from ElicitRequestU... |
| og:site_name | GitHub |
| og:type | object |
| hostname | github.com |
| expected-hostname | github.com |
| None | a793cd1fa898929111edad5857ee1f24ecf4bf7702525e67357cabc9df136fc3 |
| 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 | 311929384671aa49f385b6fcc680ae3933943203 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width