AI Glossary
Function calling
function calling, model function calling
Function calling is a mechanism that lets a language model invoke a defined function or API by generating structured arguments that conform to its schema. It is the technical basis for tool use by a model.
- The model returns structured arguments matching the function's schema, not plain text.
- It is the low-level mechanism that tool use is built on.
- The function itself is executed by an external system, and its result returns to the model.
Function calling is the mechanism that lets a language model not only state that something needs to be done, but point to a specific function or API to invoke and generate structured arguments for it — conforming to a schema provided in advance (names, types, required fields). The model doesn't execute the function itself: it returns the call structure, an external system runs it, and the result comes back to the model as context for the rest of its answer.
This is not the same as tool use. Tool use is a model's general ability to work with tools in order to act in the world beyond generating text; function calling is the low-level mechanism that delivers that ability — the format in which the model signals what it wants to run and with which parameters. In that sense, function calling is the "how" and tool use is the "why".
The same pattern also underlies standards for connecting models to tools, such as MCP, and it is the foundation of how agents work. In a deployment, what matters is a precise function description and strict control over what the model is allowed to call — a wrong or overly broad schema is a straight path to unintended actions.
Related terms