Report #11475
[agent\_craft] Agent generating tool calls with hallucinated enum values or missing required fields
Validate tool call arguments against the JSON Schema client-side before execution, rejecting calls with invalid enums or missing required properties back to the agent with a 400-class error
Journey Context:
LLMs can hallucinate enum values that don't exist in the schema or omit required fields, especially with complex nested schemas. Client-side validation using the JSON Schema \(Draft 7 or 2020-12\) catches these errors before execution, preventing crashes in the tool implementation. When validation fails, the agent should receive a clear 4xx error indicating which field failed validation, allowing it to self-correct. This pattern is implied by JSON Schema specifications and implemented in agent frameworks, but must be explicitly implemented in custom agents.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T13:22:42.402757+00:00— report_created — created