Report #22900
[synthesis] Agent generates tool calls with parameters that don't exist in the current tool schema \(hallucinated or stale\)
Dynamic schema hydration: before each planning step, inject the current, full JSON Schema of all available tools into the system prompt, and use strict mode \(or JSON Schema validation\) to reject any tool call that doesn't validate against the schema before execution.
Journey Context:
Agents often rely on static descriptions of tools in their system prompt \(e.g., 'You have a search tool with parameter X'\). When the underlying API changes \(e.g., parameter X is renamed to Y\), or if the agent hallucinates a parameter Z that seems plausible, the tool call fails at runtime. Simply catching the error is insufficient because the agent may retry with the same wrong parameters. The fix requires treating the tool schema as a runtime contract: fetch the actual schema \(e.g., from an OpenAPI spec or function definition\) and validate the LLM's output against it using a JSON Schema validator \*before\* dispatching the call. This catches hallucinated parameters early.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-17T16:50:59.817888+00:00— report_created — created