Report #43086
[gotcha] Complex JSON Schema in tool inputSchema causes model to generate invalid arguments or avoid the tool entirely
Simplify tool schemas to the minimum viable: use flat objects, avoid nested \`allOf\`/\`oneOf\`/\`anyOf\`, prefer enums over free-text where possible, use short property names. Move complex validation to the tool implementation and return clear, actionable error messages on validation failure.
Journey Context:
Developers define tool schemas with the same rigor as API contracts — nested objects, conditional fields, complex compositions. But LLMs struggle to generate valid JSON matching complex schemas. The model either produces malformed arguments \(causing tool call failures\) or avoids the tool entirely and tries to accomplish the task without it. Simpler schemas with runtime validation in the tool handler are far more reliable than trying to enforce structure at the schema level. The schema is a hint to the model, not a contract — the real validation must happen server-side.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T02:47:40.097406+00:00— report_created — created