Tool calling

Agentic AIProtocols and integrationPublished By Simon Budziak

Tool calling is the mechanism that lets a language model request an external action instead of only generating text: given a set of defined functions, the model emits a structured request naming one and its arguments, the caller executes it, and the result feeds back into the conversation.

How does tool calling actually work?

The caller describes each available tool as a name, a short description, and a schema for its arguments. When an external action would help, the model does not run anything itself: it emits a structured request naming the tool and its arguments, then stops. The application executes the real call and sends the result back for the model’s next step.

Tool calling vs function calling: is there a difference?

Not really: function calling was the original name. Tool calling is the common term now that the mechanism grew to cover web search, sandboxed code execution, and computer use. Hugging Face’s smolagents goes further, writing each action as a Python snippet. It also underlies agentic commerce, where agents complete payments through APIs.

Where does tool calling fit inside an AI agent?

An AI agent repeats tool calls. A ReAct agent makes its reason, act, observe loop explicit. MCP standardizes tool discovery and calls across applications. Programmatic tool calling moves the loop into code when the calls number in the dozens. Without reliable tool calling, agentic AI does not exist as a category.

Frequently asked questions

Is tool calling the same as function calling?

Yes, they describe the same mechanism. Function calling is the older, narrower term from when a model could only request predefined functions. Tool calling is the more current term as the same mechanism expanded to cover web search, code execution, and computer use, not only custom functions.

Does the model actually run the tool itself?

No. The model only decides which tool to call and with what arguments, and returns that as structured output. Your application, or an MCP server, is the part that actually executes the call and sends the real result back to the model.

Is tool calling enough to build an AI agent?

It is the mechanism an agent runs on, but not the whole thing. An agent also needs a loop that decides when to keep going, retry, or stop, and usually a way to standardize which tools are available, which is the problem MCP solves.

Summarize this page with

See this working in a system we built