Skip to content

AI Glossary · Concepts

What is Tool Use (Function Calling)?

Tool Use (Function Calling)

Tool use, also called function calling, is how an AI model takes real action: instead of only generating text, it emits a structured call to an external function — a search, a database query, a code run — and folds the result back into its answer.

Also known as: function calling, tool calling, tool use

· Updated · Chain of Thought

AI Agents

  • 3 explainers
  • 8 episodes
  • 2 sources

On its own, a language model can’t act on anything outside itself; it only produces output, usually text. Tool use closes the gap to the real world: the model is told what functions it can call and, when it decides one is needed, it outputs a structured request — search_orders(customer_id) — that your code executes and hands the result back for the model to use. The model chooses which tool and what arguments; your system runs it.

This is the mechanism that turns a model into an agent. Planning is useless without the ability to act, and tool use is that ability — reading a file, querying a database, calling an API, triggering a workflow. The reliability questions that dominate agent-building (does it pick the right tool? pass valid arguments? recover when a call fails?) are all tool-use questions. Open standards like the Model Context Protocol exist to make the same tools work across models and apps without bespoke wiring each time.

A valid call is not an allowed one

An illustrative check: an agent asks an order-lookup tool for an order ID that belongs to a different customer. The request matches the tool’s schema perfectly, so validation passes; the service that holds the orders still has to check that the authenticated user the agent is acting for may see that order before returning it. A second case: a write times out. If the API supports idempotency keys and the original request included one, retry with that same key and the same parameters. Otherwise, confirm the operation’s status before deciding whether to retry, or you risk doing it twice. Schema validation establishes neither permission to act nor whether a write took effect.

Sources

  • Anthropic: Tool use with Claude — Explains that the model decides when to call a tool from its description and returns a structured call that your application runs, or that the provider runs for server tools; checked October 25, 2026.
  • OpenAI: Function calling — Describes function tools defined by a JSON schema that let a model connect to data and actions your application provides; checked October 25, 2026.

Go deeper

From the conversation