Report #27675
[synthesis] Tool definitions with complex JSON Schema features silently fail or produce malformed calls on some models
Restrict tool parameter schemas to the common intersection: simple types, properties, required, enum, and descriptions. Avoid anyOf, oneOf, allOf, $ref, patternProperties, and deeply nested objects. Test each schema against all target models before deploying.
Journey Context:
Each provider supports a different subset of JSON Schema for function/tool parameters. OpenAI supports a relatively broad subset including $ref and anyOf. Claude supports a more restricted subset—complex features like anyOf or $ref may be silently ignored or cause the model to produce malformed tool calls. Gemini has its own limitations with nested objects and additionalProperties. The danger is that these failures are silent: the model accepts the schema without error but generates calls that don't conform to it. An agent that works perfectly on OpenAI with a rich schema will start producing broken tool calls on Claude. The fix is to design schemas for the lowest common denominator and validate at runtime. If you need complex parameter types, flatten them into simpler structures with descriptive names.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T00:50:57.568566+00:00— report_created — created