Function call validation
Function call validation is the server-side check that ensures an LLM-emitted function call has a valid name, schema-compliant arguments, and acceptable value ranges — before the tool actually runs.
Strict mode catches schema violations at decode time, but models still emit function calls with bad business logic — out-of-range values, references to nonexistent IDs, action requests on resources the user doesn't own. Function call validation runs after decode and before execution: schema check (probably auto), value range check, authorisation check, business-rule check. Failed validation either rejects (model retries) or asks the user for clarification. Production agentic systems in 2026 treat validation as the difference between a working agent and one that does damage when it gets confused.
When to use function call validation
- Any production agent with destructive tools.
- Multi-tenant systems where tool access must be scoped per user.
Common mistakes
- Validating only the schema, not the business logic.
- No clear error message back to the model — model can't recover without knowing why validation failed.
FAQ
What is function call validation?
Function call validation is the server-side check that ensures an LLM-emitted function call has a valid name, schema-compliant arguments, and acceptable value ranges — before the tool actually runs.
When should I use function call validation?
Any production agent with destructive tools. Multi-tenant systems where tool access must be scoped per user.
What are the most common mistakes with function call validation?
Validating only the schema, not the business logic. No clear error message back to the model — model can't recover without knowing why validation failed.
Related terms
- Function calling (tool use) — Function calling lets a language model emit a structured request to invoke a developer-defined tool, enabling reliable JSON output and agent workflows.
- Output guard — An output guard is a deterministic check applied to a language model's response before it reaches the user — validating JSON shape, blocking unsafe content, refusing if confidence is low, or rewriting failures.
- Response validation — Response validation is the post-generation check that ensures a language model's output meets schema, content, and quality constraints before it's used downstream — distinct from guardrails which gate the call itself.
- Guardrails — Guardrails are deterministic checks layered around a language model to prevent unsafe, off-topic, or non-compliant outputs from reaching the user.
Last updated: 2026-06-01. Raw markdown: https://promtable.com/glossary/function-call-validation.md.