Tool calling is how a language model gets software to act for it. The model doesn't press any buttons. It writes out a structured request naming a tool and its inputs, and other software carries the request out. Anthropic calls this "tool use", also called function calling, and OpenAI uses the term tool calling12.
The basic round trip
OpenAI describes tool calling as a multi-step conversation between an application and a model2. Its guide lists five high-level steps:
- The application sends a request to the model, along with the tools it could call.
- The model sends back a tool call.
- The application runs code using the input from that tool call.
- The application makes a second request, this time with the tool's output.
- The model gives a final response, or asks for more tool calls.
Anthropic's version matches. The model works out when to call a tool from the user's request and the tool's description, then returns a structured call. The model's side stays text. Your application's code runs the operation and sends back the result1.
Who runs the tool
This is the detail most worth knowing. Anthropic sorts tools by where the code runs1.
| Kind | Where it runs | Example named in the docs |
|---|---|---|
| Client tool | In the application that is talking to the model | Functions you define |
| Server tool | On the maker's own systems | Web search |
So a calendar tool works because someone wrote a function that reads the calendar, described it to the model, and runs it when asked. The model never touches the calendar directly. Whatever that function is allowed to do is the limit on what the agent can do. Permissions picks that up.
How the model decides
With the default setting, the model chooses at each turn between calling a tool and replying straight away1. Anthropic says the choice can be steered through the system prompt, the standing instructions given to the model, or forced with a setting called tool_choice1.
Missing details
If a request leaves out something the tool needs, the model may ask for it. It may also guess. Anthropic's example is a weather tool called without a location. Its docs say one model might ask, but might also infer a reasonable value1. A guessed input is one way a tool call goes wrong. See why agents go wrong.
A shared plug for tools
Writing a separate connector for every tool is slow. The Model Context Protocol, or MCP, is an open-source standard for connecting AI applications to external systems3. Its documentation says applications such as Claude and ChatGPT can use it to reach data sources, tools and workflows3. Each connection still has its own access. Check what you've allowed.
Where the facts come from
- Tool use with Claude, Anthropic
- Function calling, OpenAI
- What is the Model Context Protocol (MCP)?, Model Context Protocol project