Function calling
Function calling (also called tool calling) is the mechanism by which a model requests a specific, defined function with structured arguments instead of replying in prose — the bridge that lets an agent actually do things.
The developer describes each available function with a name, a description, and a typed schema for its arguments. The model, when it decides a function is needed, returns a structured call naming the function and filling its arguments, which the harness validates and executes. The result is returned to the model, which continues. Function calling is what makes the tool-use loop reliable: the model’s intent arrives as machine-readable data, not free text that has to be parsed.
Key points
- The developer exposes functions with a name, description, and typed argument schema.
- The model emits a structured call (function + arguments); the harness validates and runs it.
- It turns "the model wants to act" into machine-readable data, avoiding brittle prose parsing.
- Clear names, tight schemas, and good descriptions are what make the model call the right function with the right arguments.
Learn it by building
Way of the Agent teaches AI agent engineering level by level — concepts like this one, then hands-on practice, XP, and the AI Chronicles.
Start learning free →