Function Calling
Function calling is an LLM capability where the model — given a schema of available functions — emits a structured invocation (function name and JSON arguments) instead of free-form text, letting downstream code execute the call deterministically.
Full definition
Function calling was popularized by OpenAI in June 2023 and is now standard across Anthropic, Google, and open models. The model is fine-tuned to recognize when a user request maps to a tool, fill arguments from the conversation, and return a parseable structure. It is the substrate beneath tool use, agents, and structured-output applications. Pitfalls: hallucinated arguments, schema drift, and mishandling of parallel calls.
Why it matters
Function calling is the contract between probabilistic LLMs and deterministic enterprise systems. Done well, it lets LLMs participate safely in databases, payments, and workflows. Done poorly, it is the leading cause of agent failures in production.
Example
A finance copilot exposes get_transaction(id) and refund_transaction(id, amount). The LLM resolves "refund the duplicate charge from yesterday" into two function calls; the application enforces the actual authorization.
Related terms
- Tool Use (LLM)LLM tool use (also called function calling) is the ability of a language model to invoke external functions, APIs, databases, or systems based on the user's request — turning the LLM from a text generator into a controller that can act on the world.
- Agentic WorkflowAn agentic workflow is a multi-step AI process where a model plans, takes actions through tools, observes results, and iterates toward a goal — replacing single-shot prompting with a loop that reasons, acts, and self-corrects.
- AI Agent / Agentic AIAn AI agent is an LLM-driven system that, given a goal, plans a sequence of steps, calls tools or APIs, observes the results, and iterates until the goal is reached — going beyond single-turn chat to multi-step autonomous action.
- AI GuardrailsAI guardrails are the layered controls — input filters, output classifiers, policy engines, schema validation, and structured generation — that constrain an AI system to safe, on-policy, and on-task behavior.
Source & further reading
Primary source: OpenAI — "Function calling and other API updates" (Platform docs) (2024).
Citation policy: this entry is part of the AIDOLS AI Implementation Glossary and may be quoted for research, journalism, and education with attribution to aidolsgroup.com/da/glossary/function-calling/.