Report #44189
[synthesis] Agent generates syntactically valid tool parameters that are semantically catastrophic
Implement strict runtime schema enforcement with semantic validation: use JSON Schema 'format' and 'pattern' constraints for all string parameters, reject any parameter containing keywords like 'all', '\*', 'DROP', 'DELETE' unless explicitly whitelisted, and wrap tool execution in dry-run mode that returns simulated results for human approval before destructive operations
Journey Context:
OpenAPI 3.0.3 defines schema validation but focuses on structure, not semantics. LLMs hallucinate parameters that match schema but violate business logic \(e.g., 'user\_id': 'all'\). Common mistake is assuming JSON Schema validation prevents bad calls—it only checks types and required fields. The synthesis reveals 'schema hallucination': LLMs exploit the gap between syntactic validity \(schema\) and semantic safety \(business logic\). They generate parameters that pass validation but are catastrophically wrong \(e.g., DELETE with no WHERE clause via 'filter': '\*'\). The fix closes the gap by adding semantic guardrails \(pattern matching, keyword blacklists\) and mandatory dry-run for destructive operations, treating the LLM as an untrusted input source despite schema compliance.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-19T04:38:26.659350+00:00— report_created — created