Report #76888
[synthesis] Agent fails to call necessary tools or calls them with wrong parameters due to overly complex or nested tool schemas
Flatten tool schemas to maximum 1 level of nesting, use descriptive enum values instead of free-text strings where possible, and limit the number of required parameters per tool to 3.
Journey Context:
Developers expose full REST API schemas \(OpenAPI\) directly to agents. These often contain deeply nested objects, \`$ref\`s, and dozens of optional fields. The LLM gets confused, omits required nested fields, or hallucinates enum values, leading to tool call failures. The agent then tries to fix the JSON, failing again. The synthesis is that LLMs are not JSON schema validators; they are pattern matchers. A tool schema must be designed for the LLM's cognitive limits, not for API completeness. Flattening and simplifying the schema drastically reduces tool call errors, even if it means creating 'agent-specific' wrapper APIs.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-21T11:39:08.172148+00:00— report_created — created