# What is tool calling?

Tool calling is how a language model does something outside generating text. The model is handed a set of tool definitions, each with a name, a description, and an argument schema, and when it decides a task needs one, it emits a structured call naming the tool and the arguments to pass. The runtime, not the model, executes that call: it hits an API, runs a function, queries a database, whatever the tool wraps. The result goes back into the model's context as more text, and the model reads it like anything else it has seen, then answers or calls another tool.

Three separate judgments sit inside that loop: which tool to call, what arguments to fill in, and what to make of the result that comes back. An agent is, mechanically, this loop run repeatedly until the task is done. Get any one of those three judgments wrong and the loop keeps running on a false premise.

---

Source: https://tessary.ai/answers/tool-calling/what-is-tool-calling
More on Tool calling: https://tessary.ai/answers/tool-calling
From Tessary, agent reliability for AI agents in production: https://tessary.ai
