Fix error outputSchema defined but no structured output returned#11
Merged
Fix error outputSchema defined but no structured output returned#11
Conversation
…atibility with the MCP package ≥ 1.10), and prevent the MCP server from auto‑updating going forward.
9b37023 to
d45b95f
Compare
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR fixes a compatibility issue with the MCP (Model Context Protocol) package version 1.10, which introduced automatic output schema detection through type hints. The change disables structured output for all tools to maintain backward compatibility with the existing codebase that has type hints but doesn't follow the recommended structure.
- Adds
structured_output=Falseparameter to all tool registrations to prevent auto-detection - Includes a reference to issue #12 for implementing a proper structured output solution
| spec["handler"], | ||
| name=spec["name"], | ||
| description=spec["description"], | ||
| structured_output=False, # Structured output is temporarily disabled until proper schema definitions are implemented. See https://github.com/ydb-platform/ydb-mcp/issues/12 for details. |
There was a problem hiding this comment.
The comment should explain why structured_output is disabled, not just reference an issue. Consider: '# Disable structured output due to MCP 1.10 auto-detection breaking existing tools - see issue #12'
Suggested change
| structured_output=False, # Structured output is temporarily disabled until proper schema definitions are implemented. See https://github.com/ydb-platform/ydb-mcp/issues/12 for details. | |
| structured_output=False, # Disable structured output due to MCP 1.10 auto-detection breaking existing tools - see issue #12 |
vgvoleg
approved these changes
Aug 12, 2025
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.
The mcp package add auto output schema detection by typehints in 1.10 version
modelcontextprotocol/python-sdk#1005
For our code it break all output, because we have typehint, but not follow recommended struct.
The fix need for fix work in old style.
Better fix with describe scheme #12