Fast mcp and structured output #1680
Open
+91
−51
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.
FastMCP structured output improvements
brief summary of changes :
Improve FastMCP structured-output handling for 'dict[str, T]' return types and mixed-list tool outputs, and make the test suite/CI more robust:
Motivation and Context :
FastMCP’s structured-output support had a couple of rough edges and CI reliability issues:
This PR makes structured-output behavior more predictable for users, preserves documented metadata, and ensures the FastMCP test suite passes cleanly across platforms and Python versions.
How Has This Been Tested?
Locally, in the 'python-sdk' project, I ran the test and tooling commands recommended in 'CONTRIBUTING.md':
Behaviorally, the following scenarios are explicitly covered by tests:
Breaking Changes :
These changes are not expected to be breaking:
Types of changes
Checklist
Additional context