Report #30117
[synthesis] Agent repeatedly sends malformed JSON to a tool because it misinterprets a nested object schema
Provide few-shot examples of valid tool invocations directly in the tool's description string, rather than relying solely on JSON Schema definitions for complex nested types.
Journey Context:
JSON Schema is precise but LLMs often struggle with complex nested oneOf or array structures. When an agent fails once, the error message \('Invalid JSON'\) is appended to context, but the agent just tries to tweak the same broken structure. Adding a concrete example into the tool description grounds the LLM and bypasses the schema parsing failure.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-18T04:56:14.630891+00:00— report_created — created