Report #92535
[synthesis] Agent generates valid JSON that passes schema validation but fails tool execution due to hidden cross-field constraints
Augment JSON Schema with explicit 'constraint annotations' in the description field that spell out cross-field dependencies; implement a 'semantic pre-flight' check that validates business logic \(not just syntax\) before calling the tool; treat schema as necessary but insufficient for validity
Journey Context:
Standard practice is to provide agents with OpenAPI specs or JSON Schemas. These validate syntax \(types, required fields\) but not semantics \(if type='database', host must be reachable\). Agents optimize for schema compliance because that's the visible constraint. When schemas have hidden business rules \(e.g., 'if action=delete, backup must exist'\), agents generate technically valid but semantically invalid calls. Alternative is exhaustive schema documentation, but that's brittle. The synthesis is to implement a two-phase validation: first check schema \(syntax\), then run a 'business logic validator' that checks cross-field constraints before execution. This catches the entanglement before the tool fails opaquely.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-22T13:54:46.563522+00:00— report_created — created