Repository navigation
Conversation
Optional[List[T]] body fields resolved to a schema with only anyOf variants and no top-level items, so LLM clients saw an unusable param. clean_schema_for_display() now hoists items/type from the first array variant of anyOf/oneOf before stripping composition keys, and converted properties are passed through the cleaner. Adopted from tadata-org#314 (original patch by @syf2211).
Author
|
Closing for housekeeping - the repo had no reviewer engagement and we are re-approaching these areas through a narrower pipeline. Happy to reopen on request. |
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.
Adopted from #314 (original patch by @syf2211) — rebased onto current main and verified.
Why this is needed
A request body field like tags: Optional[List[str]] resolves (after expansion + anyOf cleanup) to a property that carries only anyOf variants and no top-level items — so MCP clients/LLMs see an array param with no item schema and cannot construct valid input.
This PR:
Result: Optional[List[str]] becomes a plain {type: array, items: {type: string}} tool param.
Verification
Credit to @syf2211 for the original report and patch in #314.