-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Add option to skip output validation for mcp client #2626
Copy link
Copy link
Open
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 supportedneeds decisionIssue is actionable, needs maintainer decision on whether to implementIssue is actionable, needs maintainer decision on whether to implement
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 supportedneeds decisionIssue is actionable, needs maintainer decision on whether to implementIssue is actionable, needs maintainer decision on whether to implement
Type
Fields
Give feedbackNo fields configured for issues without a type.
Description
MCP Client session currently validates the output generated by MCP servers agains the reported json schema, and raises
ValidationError.This means that MCP server tools that have a not well maintained output schema, but are otherwise functional, are unusable.
The request is to add an option either at the
ClientSessioninterface and/or thecall_toolmethod so skip validation and return the result even if it does not conform to the output schemmaReferences
https://github.com/modelcontextprotocol/python-sdk/blob/main/src/mcp/client/session.py#L319-L349