Repository navigation
fix: preserve non-object types in referenced MCP schemas - #304
Conversation
There was a problem hiding this comment.
Source check of fb23ab64fa8816f0d9485eb8ace065ceb82b0740: scalar, array and nullable references use the field-conversion path, while object models retain the existing cache behavior. The added direct and alias cases cover the reported issue.
Follow-up: normal repository CI passed 392 tests with 3 MiniMax integration skips, including the 9 new reference cases and 42 existing transformer cases. Black and Flake8 passed. Approved and merged. The resolver change overlaps #300; retain one implementation when reconciling that follow-up.
Eigenwise
left a comment
There was a problem hiding this comment.
Checked fb23ab64fa8816f0d9485eb8ace065ceb82b0740. The scalar, array, nullable and alias reference cases now use the field converter while object definitions retain their model/cache path. Normal repository CI passed: 392 tests, with 3 MiniMax integration skips, plus Black and Flake8. That includes the 9 new reference cases and 42 existing transformer cases. No blocking correctness finding remains.
MCP schemas may reference strings, arrays or nullable values in
$defs/definitions. The transformer currently builds an empty object model for every reference, so otherwise-valid scalar and array tool arguments fail validation.Resolve non-object definitions through the existing field-type converter, retaining nested models for object definitions and the recursion cache. This also handles chained aliases and references used as array items. Nine regressions fail before the fix; the complete core suite passes afterward (392 passed, 3 credential-dependent skips, 93% coverage). Repository-wide Black and Flake8 checks pass.