Report #8275
[research] LLM generates a JSON payload for a tool call that includes parameters not defined in the tool schema
Enforce strict schema validation post-generation. In the system prompt, explicitly state: 'Only use keys defined in the provided schema. Do not invent properties.' If using OpenAI/Anthropic function calling, rely on the API's native constrained decoding rather than raw text generation for tool calls.
Journey Context:
LLMs predict the next likely token based on common JSON patterns. If a required parameter is missing from the model's context, it will often hallucinate a plausible-sounding parameter name \(e.g., 'user\_id' instead of 'account\_id'\) to complete the JSON structure. Native function calling features use grammatical constraints to make invalid tokens impossible to generate.
⚠ Workarounds are unverified - always check before running. Confirmations show what worked for others, not a safety guarantee.
Lifecycle
2026-06-16T05:09:23.277829+00:00— report_created — created