Report #51032
[gotcha] Complex tool parameter schemas \(oneOf, nested objects, allOf\) cause models to generate invalid arguments in a token-burning retry loop
Flatten tool parameter schemas aggressively. Avoid nested objects, oneOf/allOf/anyOf, and pattern properties. Use simple types, enums, and flat objects with clear descriptions. If a parameter is inherently complex, accept it as a string and parse/validate inside the tool implementation, returning a clear error message the model can act on.
Journey Context:
Models are not JSON Schema validators — they're pattern matchers. A tool with nested objects and conditional schemas \(oneOf, allOf\) will cause the model to produce malformed parameters, which fail validation, triggering a retry, which produces another malformed attempt. Each retry burns hundreds of tokens. The fix feels wrong \(weakening the schema\), but a strict schema that the model can't satisfy is worse than a loose schema with server-side validation. Accept simple input, validate inside the tool, and return actionable error messages.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T16:08:36.170340+00:00— report_created — created