Conversation
4 tasks
Owner
|
Superseded by #271, which cherry-picks your commit (preserving authorship) and layers the upstream fixes on top. The core schema-flattening fix went into zerodep (Oaklight/zerodep#173) and llm-rosetta (Oaklight/llm-rosetta#747) since the bug was in the shared libraries, not just toolregistry. Your Thanks for the detailed issue and PR — the bare-tuple normalization was a nice catch. |
Author
|
Thank you!! |
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.
Summary
oneOf/anyOfbranches inTool.parametersinstead of selecting the first non-null branchtupleannotations totuple[Any, ...]so they render as JSON arrays rather than{}float | list[float] | Noneand the reportedtuple | float | list[Any] | NoneannotationWhy
Tool._normalize_parameters()used the genericflatten_schema()pipeline, which intentionally reduced multi-variant unions to their first non-null branch. This narrowed the advertised wire contract relative to the callable. If the first branch was a baretuple(rendered as{}by the schema backend), normalization could leave the property with no JSON type at all.Schema-driven MCP clients therefore could not send valid array values for affected parameters, despite those values passing direct Python calls and ToolRegistry validation.
Fixes #269.
Downstream report and temporary workaround: UXARRAY/uxarray-mcp-server#164.
Testing
138 passedin the focused schema/tool suite1352 passed, 3 skippedin the full suite withtest,mcp, andptcextrasAI assistance
AI was used to assist with investigation, implementation, and drafting tests. I reviewed and tested the submitted changes.