# Tool Use (Function Calling)

> A way for a model to ask an app to run a tool. The app sends back what it got.

**Field:** Artificial Intelligence  
**Category:** AI Agents  
**Also known as:** Function Calling, Tool Calling, Tool Call

## Think of it like

Think of it like asking a grown-up to reach the top shelf. You say what you need, and they get it for you.

## Definition

Tool use is how a language model asks a program to run a function for it. The app first describes each tool with a name, a short note and the inputs it takes. When the model needs one, it replies with a tool call: the tool's name and the inputs, in JSON. The app runs the tool and sends the result back. The model then uses that result to carry on or to answer.

## Example

Emma asks her assistant what the weather is in Lisbon. The model calls a weather tool with the city, gets back 21 degrees and sun, and answers.

## Example code

```json
{
  "type": "tool_use",
  "name": "get_weather",
  "input": { "city": "Lisbon" }
}
```

The model does not fetch the weather itself. It sends this request, and the app runs the tool.

## Why it matters

It is how models reach live data and take actions. Every agent is built on it.

## Common mistake

Writing vague tool notes. The model picks tools by their notes, so an unclear note means the wrong tool.

## Three principles

- **Model asks.** Name and inputs.
- **App runs it.** The model never does.
- **Result goes back.** The model carries on.

## Related terms

- [AI Agent](https://learn.benibix.com/term/ai/ai-agent)
- [Structured Output (LLM)](https://learn.benibix.com/term/ai/structured-output)
- [Agent Loop](https://learn.benibix.com/term/ai/agent-loop)
- [JavaScript Object Notation (JSON)](https://learn.benibix.com/term/development/json)
- [Model Context Protocol (MCP)](https://learn.benibix.com/term/ai/model-context-protocol)
- [Claude Code Built-in Tool](https://learn.benibix.com/term/ai/claude-code-built-in-tool)
- [Tool Definition](https://learn.benibix.com/term/ai/tool-definition)

## Told apart from

- [MCP vs Tool Use](https://learn.benibix.com/compare/model-context-protocol-vs-tool-use): People often think MCP is a new way for models to use tools that replaces tool use. It is not. Tool use is what the model does: it asks for a tool by name and reads the result. MCP is how an app finds tools made by others and plugs them in. Under MCP, the model still uses tools in the same way.

![The model sends a tool call with a name and inputs. The app runs the tool and sends the result back. The model uses it in its answer.](https://learn.benibix.com/diagrams/ag-tool-use.svg)

---

Source: https://learn.benibix.com/term/ai/tool-use
Author: Behnia Zarei (a developer in Vienna, Austria, who builds and teaches data, AI and business intelligence at BENIBIX)
Publisher: BENIBIX Learn (https://learn.benibix.com/)
Last updated: 2026-11-19
Licence: CC BY 4.0 (https://creativecommons.org/licenses/by/4.0/). Quote freely with attribution.
