Free auditStart free
GlossaryGlossary · AI search

Tool use

Tool use lets a model return a structured call to a function you define or a vendor provides. The request loop, client versus server tools, and a quick check.

3 min
read
2
sources
Oct 31, 2026
updated
Scaplet Editorial Team
author
In one line

Tool use, also called function calling, lets a language model return a structured call to a tool you describe, instead of only text. Your application runs the call and sends back the result, or the vendor runs it for server-side tools. The model never executes your code itself.

30-second check

Is this costing your site traffic?

Four quick questions, then a straight answer.

1/4Have you checked your own site for this?
Summarize this page withChatGPTClaudePerplexityGoogleAI Mode

At a glance

4 facts from the sources below
Function calling
Also called
In your application
Client tools run
On the vendor's infrastructure
Server tools run
JSON schema
Schema format
01At a glance

The request loop

Anthropic's docs describe the pattern for client tools. You define a tool with a name, a description and an input_schema. Claude decides, from the request and the description, whether to call it. If it does, the response carries stop_reason: "tool_use" and one or more tool_use blocks. Your code runs the operation and sends back a tool_result. OpenAI's flow has the same shape with different item names.
Step

1. Declare tools

Anthropic Messages API
tools with name, description, input_schema
OpenAI Responses API
Tools with type: "function", name, description, parameters
Step

2. Model asks for a call

Anthropic Messages API
tool_use block, stop_reason: "tool_use"
OpenAI Responses API
function_call item with call_id, name, arguments
Step

3. You run it

Anthropic Messages API
Your application
OpenAI Responses API
Your application
Step

4. Return the result

Anthropic Messages API
tool_result block with the matching tool_use_id
OpenAI Responses API
function_call_output item with the matching call_id
Step

5. Final answer

Anthropic Messages API
Next response, or more tool calls
OpenAI Responses API
Final response, or more tool calls
03At a glance

Client tools and server tools

Where code runs

Client tools
Your application
Server tools
Vendor infrastructure

Your job

Client tools
Run the call, return the result
Server tools
None for execution

Anthropic examples

Client tools
Your own functions, bash, text_editor
Server tools
web_search, web_fetch, code_execution, tool_search

Extra cost

Client tools
Normal token pricing
Server tools
Some add usage-based charges, such as web search

Anthropic notes that tool definitions, tool_use blocks and tool_result blocks all count toward input and output tokens, and that tool use adds a model-specific system prompt overhead. Keep descriptions short and the tool list small. OpenAI's guidance suggests keeping the initially available functions under about 20, and using tool search for larger sets.

Tool use is the building block of AI agents, and the Model Context Protocol is a standard way to package tools so many applications can share them.

04Worth knowing

Mistakes that cause bad calls

Vague descriptions

Say when to use the tool and what it returns.

Letting the model supply known values

OpenAI advises not asking the model for arguments your code already has.

Free-text where an enum fits

OpenAI recommends enums and structured objects to prevent invalid inputs.

Assuming one call per turn

Handle zero, one or several calls in a response. Anthropic's disable_parallel_tool_use and OpenAI's parallel_tool_calls: false limit this.

05How it works

Check it in 2 minutes

  1. 1

    Ask for a call the tool can answer

    Send a prompt that clearly maps to one tool and confirm the response contains a tool call with sensible arguments.

  2. 2

    Ask for one it cannot

    Send a prompt outside the tool's scope and confirm the model answers directly instead of forcing a call.

  3. 3

    Round-trip the result

    Return a tool_result or function_call_output using the matching ID, and confirm the final answer uses it.

Sources · 2

Every fact, linked and dated.

Official docs first. The date is when we last opened each page.
  • claude.com
  • openai.com
  1. 01Tool use with Claude (Anthropic)platform.claude.com · checked 2026-11-01
  2. 02Function calling (OpenAI)developers.openai.com · checked 2026-11-01
Questions

Asked a lot.

2 questions people ask next, answered from the sources on this page.

01Is tool use the same as function calling?

Yes. Anthropic's docs say tool use is also called function calling. Vendors differ in field names and response items, so check each vendor's reference when you port code.

02Can I force the model to call a specific tool?

Yes. Both vendors document a tool-choice setting. OpenAI lists auto, required, a specific function, an allowed subset, and none. Anthropic's default is {"type": "auto"}, with options to require a call.

Free · 2 minutes

Know the term. Now check your site.

The free audit reads robots.txt, sitemaps, status codes, canonicals, redirects and structured data.

Free, no card60 secondsNobody will call you
  • 46 fixes shipped without a ticket Brightpipe
  • +212% organic clicks in 90 days Ledgerly