What is tool calling, and why do agents need it?
The idea in one line
Tool calling is the mechanism that lets a language model request an action from external code, such as looking something up, doing math reliably, or saving a record. The model outputs a structured request, the surrounding program runs it, and the result is returned to the model.
Why models need tools
A language model predicts text and is not reliable at exact arithmetic, live data, or changing the state of a system. Tools cover those gaps: a calculator for math, a search function for current information, and an action function to actually do something rather than describe it.
Describing tools well
The quality of tool use depends heavily on clear descriptions and well-defined inputs. A tool with a precise name, a short purpose, and typed parameters is much easier for a model to use correctly than one that is vaguely named or overloaded.
This article is general educational information, not technical, legal or business advice. AI agent capabilities, tools and costs change quickly, so verify current details and check important output before relying on it.
← All agent guides