Glossary · Agent architecture

Tool use (LLMs)

A model's ability to call external tools, such as your functions, web search, code execution or MCP servers, during a conversation and use the results.

Tool use is a language model’s ability to call external capabilities during a conversation, such as your own functions, web search, code execution or MCP servers, and to continue with the results.

Where the tool runs. Anthropic’s documentation, which uses the term tool use and notes that it is also called function calling, sorts tools by where the code executes. Client tools run in your application: the model stops with stop_reason: "tool_use" and a tool_use block, your code performs the operation, and you send back a tool_result. Server tools, such as web search, web fetch and code execution, run on Anthropic’s infrastructure, and the results come back without handler code on your side. OpenAI draws a similar line between function tools, which your code executes, and built-in tools and remote MCP servers that its platform handles.

Tool use and function calling. The terms overlap and are often used interchangeably. Function calling usually names the mechanism for your own functions: the model returns a structured call, and your code runs it. Tool use is the broader capability, which also covers tools the provider runs for you. The MCP vs function calling comparison shows how tools from MCP servers reach the model through the same mechanism.

Control. Each major API lets you steer it. Anthropic’s and OpenAI’s tool_choice settings and Gemini’s function calling modes can let the model decide, require a tool call, or forbid one. Models can also request several tools in one turn.

Designing tools. Anthropic’s “Building effective agents” advises giving the agent-computer interface the same care as a human interface: clear names and descriptions, examples, and parameters that are hard to misuse. Tool definitions and tool results both enter the model’s context window, so both cost tokens, and results from outside sources can carry prompt injection. For tools with side effects, agent frameworks add approval steps and guardrails before execution.

Neighbouring terms. Function calling is the core mechanism. MCP standardizes where tools come from. An AI agent is, at its simplest, a model running tool use in a loop.

Sources

  1. Anthropic documentation: Tool use with Claude (accessed )
  2. OpenAI API documentation: Function calling (accessed )
  3. Google AI for Developers: Function calling with the Gemini API (accessed )
  4. Anthropic: Building effective agents (19 December 2024) (accessed )