-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Upgrade types.py to 2025-03-26 protocol version #456
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade types.py to 2025-03-26 protocol version #456
Conversation
a5a4ad2
to
a2e3bc7
Compare
The support for tool annotations #445 will probably benefit from this PR as well. |
@HeetVekariya I'm not a maintainer, so it is not my call to make on who gets to work on tool annotation tests. In fact, I'm not even certain if my PR will get reviewed/merged. |
@@ -705,15 +748,77 @@ class ListToolsRequest(PaginatedRequest[RequestParams | None, Literal["tools/lis | |||
params: RequestParams | None = None | |||
|
|||
|
|||
class ToolAnnotations(BaseModel): | |||
""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
To set the optional bool default values, I think you would do:
readOnlyHint: bool = False
destructiveHint: bool = True
idempotentHint: bool = False
openWorldHint: bool = True
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking through the rest of the code, the convention seems to be to set the default to None instead of False/True? I think the default convention makes sense because we want to tell if the other side specified True/False or left it absent.
Note that this PR probably conflicts with a later PR #482, in which the default is left as None as well.
Not sure if you've permission to merge, but if you do, it looks like PR #482 is likely to be merged, so maybe I'll leave the ToolAnnotations out so we can merge the rest?
a2e3bc7
to
d91ccdf
Compare
any updates on this PR, would love to get the spec up to the latest! |
Following up on this. Any idea when this will get merged & released? |
Unfortunately I'm unable to secure a code review from repository owners and thus unable to merge this. If anyone is able to persuade any repository owner to review and merge this, I'm would love to promptly and expeditiously get this merged. Also, I believe some of the changes here has already been landed in various other PRs such as: So maybe check if what you wanted is already in there. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution, closing this PR because of the following reasons:
-
The PR contains a mix of features that need separate handling:
- Tool Annotations are already implemented as confirmed in PR Add ToolAnnotations support in FastMCP and lowlevel servers #482, which has been merged
- Other features like JSONRPCBatch, AudioContent, and CompletionCapability are not yet in the main branch and should be handled separately
-
Version number upgrading (from 2024-11-05 to 2025-03-26) should be done in a separate PR with appropriate tests and documentation updates
This PR upgrades types.py to the 2025-03-26 protocol version.
Motivation and Context
This is needed to support batch JSON RPC #444
How Has This Been Tested?
All tests and type check passed.
Breaking Changes
None
Types of changes
Checklist