Schema Hallucination: Tool Call Validation

Reliability · updated Wed Feb 25

Preventing execution failures caused by invalid JSON or arguments.

Steps

  1. Intercept tool actions before they reach the execution engine.
  2. Validate the JSON payload against the tool's required schema.
  3. Re-prompt the agent with raw error messages and schema definitions.
  4. Limit 'Correction Turns' to 2 attempts before session termination.
  5. Apply local 'Syntax Repair' for common JSON formatting errors.

view raw JSON →