Tool calling
Tool calling is the capability that lets a large language model (LLM) use external tools like APIs, functions, databases, or services. By producing a structured request to invoke a tool, an application or the model provider can then execute a task and return a result to the model. This is how a model moves beyond generating text to fetching live data and taking actions.
Tool calling, function calling, and “tool use” refer to the same core mechanism, but “tool calling” is the broader, more current term, covering not just developer-defined functions but also built-in and externally connected tools.
In short: tool calling lets a model invoke external tools by emitting structured calls—the umbrella term for function calling, built-in tools, and connected tools alike.
How tool calling works
The application and the model pass control back and forth, with execution always outside the model:
- Expose tools: The application gives the model a set of tools, each with a name, a description, and an input schema (typically a JSON schema describing the parameters the tool accepts).
- Decide: Based on the request, the model chooses whether to call a tool and which one, emitting a structured call with arguments.
- Execute: The call is run, either by the application (a client tool) or by the provider (a built-in server tool), and a result is produced.
- Return and continue: The result is fed back to the model, which uses the result to answer or to make another tool call. This cycle repeats until the model produces a final response.
The defining point is that the model never executes anything itself. It proposes a structured call, and execution always happens outside the model, keeping side effects and control with the application or provider.
Tool calling vs. function calling and MCP
- Function calling is the original, narrower term that emphasizes developer-defined functions; tool calling is the broader umbrella that also includes provider-hosted tools and connected services. In practice the words are often used interchangeably.
- Client tools are tools your application executes, such as your own functions and APIs; built-in (server) tools are ones the provider runs for you, such as web search or code execution.
- Model Context Protocol (MCP) is a standard for connecting tools to models so one tool can be called across many models without custom-coded connections; tool calling is the act, and MCP is one way the tools are exposed.
Where tool calling is used
- Live data and actions: Giving a model the ability to look things up or take actions it cannot do from memory, such as querying a database, sending a message, or running code.
- Agents: Agentic systems are built on tool calling, chaining many calls together to complete multi-step tasks.
- Grounding and RAG: A search tool retrieves fresh sources that become the model’s context, feeding RAG and helping reduce unsupported claims. Grounding alone does not eliminate hallucinations entirely.
- A search API as a tool: One of the most common tools is web search. A developer can define a “web_search” tool whose implementation calls a search API, or connect one through an MCP server such as the Brave Search MCP server, and the model can pull live, citable results into its answers.
Tool calling is the bridge between a model’s reasoning and the outside world, and a search API is often the first tool worth giving to a model.
Related terms
Function calling, tool use, Model Context Protocol (MCP), agentic search, retrieval-augmented generation (RAG), structured output, large language model (LLM), API, search API.

