fix: Align ElicitResult action naming with specification#2316
Closed
goingforstudying-ctrl wants to merge 3 commits intomodelcontextprotocol:mainfrom
Closed
fix: Align ElicitResult action naming with specification#2316goingforstudying-ctrl wants to merge 3 commits intomodelcontextprotocol:mainfrom
goingforstudying-ctrl wants to merge 3 commits intomodelcontextprotocol:mainfrom
Conversation
Add optional protocol_version parameter to ClientSession.__init__() to allow callers to override the default LATEST_PROTOCOL_VERSION when connecting to servers that require a specific protocol version. Fixes modelcontextprotocol#2307
Change action value from "decline" to "reject" to match the MCP specification. The specification defines three actions for Elicitation: - accept - reject - cancel But the Python SDK was using "decline" instead of "reject". This fixes the inconsistency between the SDK and the specification. Fixes modelcontextprotocol#1056
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fix inconsistent naming between Python SDK and MCP specification for Elicitation actions.
Problem
The MCP specification defines three actions for Elicitation:
acceptrejectcancelHowever, the Python SDK was using
"decline"instead of"reject", causing inconsistency.Solution
Changed the action literal from
"decline"to"reject"inElicitResulttype definition to align with the specification.Impact
This is a breaking change for any code using the "decline" action. Users will need to update their code to use "reject" instead.
Fixes #1056