← Back to topic library
AI MaxxingIntermediate90 sec
Tool calling
Tool calling is a model's ability to request that a specific external function be run, with structured arguments, then use its result to continue responding.
Prerequisite: AI assistant
What matters
This is what turns a model from a pure text generator into something that can check real-time data or perform an action, by handing off the actual execution to code outside the model.
Example
Asked for tomorrow's weather, a model with tool calling requests a 'get_weather' function with a city argument, then incorporates the returned result into its reply.
Common misconception
Tool calling does not mean the model executes code itself; it only requests a call, and the surrounding application actually runs the function.
Recall question
Who actually executes the function when a model performs tool calling?
Keywords and related concepts
tool callingfunction callingstructured outputagent loop