Tool Calling
Tool calling is the broader application pattern of exposing external capabilities to a model, so it can use them to complete a task rather than just generate text.
What Is Tool Calling?
"Tool calling" and "function calling" are closely related, and different providers and frameworks don't always use the terms identically. A reasonable, commonly used distinction: function calling is the specific mechanism — a model generating a structured call to one described function. Tool calling is the broader pattern this enables: giving a model a set of capabilities (tools) it can choose to invoke to accomplish a task.
Tip
Don't assume terminology is perfectly standardized here. If you're reading a specific framework's or provider's documentation, check how they specifically define "tool" versus "function" — the concepts are consistent, but the exact vocabulary varies.
What a Tool Looks Like
A tool is defined by what it takes in, what it does, and what it returns:
- A definition — name, description, and expected inputs, so the model knows when and how to use it.
- Execution — the application runs the underlying logic, whether that’s an API call, a database lookup, or a calculation.
- A result — structured output returned to the model so it can continue reasoning or respond to the user.
Common examples of tools: a weather lookup, a database query, a web search, a calculator, or an internal company API. The pattern is the same regardless of what the tool actually does underneath.
Orchestration
When more than one tool is available, something needs to decide which tool to call, in what order, and what to do with the results — that coordination is often called orchestration. In a simple case, a single function call is enough. In more complex tasks, this coordination is exactly what an AI agent's control loop is responsible for.
Common Mistakes
Assuming "tool" means the same thing everywhere
Different frameworks and providers use "tool" and "function" slightly differently — check the specific definition you’re working with.
Giving a model too many overlapping tools
Ambiguous or redundant tool choices make it harder for the model to reliably pick the right one.
Skipping error handling for tool execution
A tool call can fail — a timeout, an invalid response, a missing permission — and the application needs to handle that, not just assume success.
Interview Question
What is tool calling, and how does it relate to function calling?
Function calling is the specific mechanism where a model generates a structured request to invoke one described function. Tool calling is the broader pattern that mechanism enables — giving a model access to a set of external capabilities, or tools, that it can choose to use to complete a task. The terminology isn't perfectly standardized across providers and frameworks, but the underlying idea is consistent: the model decides what's needed, and the application executes it and returns a result.
What an interviewer may ask next
- Can you give an example of a tool a model might use?
- What happens when a model has access to multiple tools?
- What is orchestration, in this context?
Explain It in 30 Seconds
Tool calling is the pattern of giving a model access to external capabilities — like a search tool, a database lookup, or a calculator — that it can choose to invoke to complete a task. Function calling is the specific mechanism underneath it: the model generates a structured request to call one described function, and the application executes it and returns a result. The terms overlap depending on who you ask, but the idea is the same: the model decides, the application acts.