-
Notifications
You must be signed in to change notification settings - Fork 3.3k
Inconsistency in types.py schema for RequestParams #913
Copy link
Copy link
Closed as not planned
Labels
P3Nice to haves, rare edge casesNice to haves, rare edge casesenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedimproves sdk consistencyImproves consistency with other SDKs such as TyepscriptImproves consistency with other SDKs such as Tyepscriptready for workEnough information for someone to start working onEnough information for someone to start working on
Metadata
Metadata
Assignees
Labels
P3Nice to haves, rare edge casesNice to haves, rare edge casesenhancementRequest for a new feature that's not currently supportedRequest for a new feature that's not currently supportedimproves sdk consistencyImproves consistency with other SDKs such as TyepscriptImproves consistency with other SDKs such as Tyepscriptready for workEnough information for someone to start working onEnough information for someone to start working on
Describe the bug
Not sure if I'm missing something, but I found that I was unable to add extra fields to
RequestParamsin the MCP Python schema intypes.py(e.g., I'm trying to pass auth tokens along forListToolsRequest). The Python MCP schema ignores extra fields at the top level ofRequestParams, but the TypeScript MCP schema does not.To Reproduce
Try to create a
RequestParamsinstance with an extra field at the top level (not insidemeta), e.g.:The additional field
foois ignored.Expected behavior
Extra fields at the top level of
RequestParamsshould be accepted, matching the TypeScript schema’s behavior.Additional context
Metaclass: