---
title: "Tool Call"
slug: "tool-call"
category: "glossary"
tags: ["glossary", "ai-agents", "tool-call", "function-calling", "llm"]
status: "stable"
last_updated: 2026-08-14
summary: "A tool call is a structured request a language model emits, asking the caller to execute a defined function and return its result to continue reasoning."
related:
  [
    "[[ai-agents/tool-use-and-function-calling]]",
    "[[glossary/function-calling]]",
    "[[glossary/structured-output]]",
    "[[glossary/completion]]",
    "[[glossary/schema-validated]]",
    "[[ai-agents/multi-agent]]",
    "[[glossary/mcp]]",
  ]
---

## Overview

This page is the atomic definition. Tool design and calling best practices live at [[ai-agents/tool-use-and-function-calling]].

## Definition

A tool call (also called a function call) is a structured output block generated by a model that names a tool and provides JSON-encoded arguments. The caller is responsible for executing the tool and returning its result in a subsequent message. The model then uses the result to continue its response.

In the Anthropic Messages API, a tool call appears as a `tool_use` content block with fields: `type`, `id`, `name`, and `input` (a JSON object of arguments).

The caller runs the named function, then sends back a `tool_result` block referencing the `tool_use_id`. The model continues generating with the result in context.

Tool schemas are defined as JSON Schema objects in the `tools` parameter of the API request. The model does not execute tools; it only generates the call. The caller controls execution, allowing it to validate arguments, apply rate limits, audit logs, or deny unsafe calls.

`stop_reason = "tool_use"` indicates the model paused its completion to request tool execution.

## When it applies

Use tool calls to let a model access real-time data (search, databases, APIs), perform calculations, or take actions (send email, write a file). Define narrow tools with clear descriptions and strict schemas. Validate tool inputs before executing; the model may hallucinate argument values. Return structured, concise results; long tool output fills context quickly.

## Example

```python
import anthropic

client = anthropic.Anthropic()
tools = [{
    "name": "lookup_order",
    "description": "Look up an order by order ID and return its status.",
    "input_schema": {
        "type": "object",
        "properties": {"order_id": {"type": "string"}},
        "required": ["order_id"]
    }
}]

response = client.messages.create(
    model="claude-sonnet-5",
    max_tokens=512,
    tools=tools,
    messages=[{"role": "user", "content": "What is the status of order #12345?"}]
)

if response.stop_reason == "tool_use":
    tool_block = next(b for b in response.content if b.type == "tool_use")
    order_status = lookup_order(tool_block.input["order_id"])
    # Continue conversation with tool_result...
```

## Related concepts

- [[ai-agents/tool-use-and-function-calling]] - the deep-dive on schema design and calling best practices.
- [[glossary/function-calling]] - the older synonym for tool call, still used in OpenAI API documentation.
- [[glossary/structured-output]] - tool calls are one form of structured output; schemas constrain arguments.
- [[glossary/schema-validated]] - JSON Schema validation should gate tool execution.
- [[glossary/completion]] - a completion with `stop_reason = "tool_use"` contains a tool call.
- [[glossary/mcp]] - MCP is a protocol that standardizes tool discovery and execution across hosts.

## Citing this term

> See [[glossary/tool-call|Tool Call]] (llmbestpractices.com/glossary/tool-call).

## Related

- [[ai-agents/tool-use-and-function-calling]]
- [[glossary/function-calling]]
- [[glossary/structured-output]]
- [[glossary/schema-validated]]
- [[ai-agents/multi-agent]]
