What is Function Calling (Tool Use)?
Function Calling, also called Tool Use, is the mechanism that lets an AI model invoke a predefined external function or API in the middle of answering a request, instead of only generating text. It allows a model to fetch live data, run a calculation, or trigger an action, then incorporate the result back into its response.
TL;DR
Function Calling lets an AI model actually do something, like fetch live data or run a calculation, instead of just generating text based on what it already knows.
Why It Matters
Function Calling matters because it's the difference between an AI system that can only describe what it thinks is true and one that can go check. A model's training data has a knowledge cutoff and no access to a specific business's live systems, so without function calling it can only guess or hallucinate about current numbers. With it, the model can call a defined function, like get current revenue, get the real value, and then reason over accurate, current information. This is also the foundational capability behind AI agents, since an agent that can only generate text can't actually take multi-step action in the world; it needs function calling to interact with real systems. The reliability of an AI feature that claims to check your data, rather than just talk about it, depends directly on how well it uses function calling rather than filling gaps with a plausible-sounding guess.
Example
A user asks an AI Assistant what was our revenue last month. Instead of generating a guessed number from training data, the model calls a defined get_revenue function connected to the business's actual finance data, receives the real figure back, and then writes a response incorporating that verified number, rather than a hallucinated one.
Frequently Asked Questions
Related Terms