Claude Tool Use Overview: What It Is, How It Works
What Claude Tool Use Actually Is
Tool use (sometimes called function calling) lets Claude go beyond generating text — it can request that your application run a specific function, then use the result to finish its answer. Instead of guessing a stock price, doing arithmetic in its head, or hallucinating a database record, Claude tells you exactly which tool it wants to call and with what arguments, waits for you to execute it, and continues the conversation with the real data in hand.
This matters because a language model on its own only knows what was in its training data plus whatever you put in the prompt. Tool use closes that gap: it connects Claude to live data (weather, prices, inventory), internal systems (your database, CRM, ticketing tool), or deterministic logic (calculators, code execution, unit conversions) without you having to fine-tune anything. If you're evaluating whether to build an agent, a customer support bot, or a data assistant on Claude, tool use is the mechanism that makes it actually useful instead of just conversational.
How the Workflow Fits Together
Tool use isn't a separate API — it's a structured extension of the normal messages call. The cycle looks like this:
- You send a request with a list of available
tools, each described by name, a plain-language description, and a JSON schema for its inputs. - Claude decides whether answering the user requires a tool. If so, it stops generating and returns a
tool_useblock containing the tool name and the arguments it wants to pass. - Your code executes that function (a real API call, a database query, anything).
- You send the result back as a
tool_resultblock in a new message. - Claude reads the result and continues — either finishing its answer or calling another tool if the task needs more steps.
This request-response loop is the core pattern behind every Claude-powered agent, whether it's answering "what's the weather in Lisbon tomorrow" or executing a multi-step workflow that touches five internal systems in sequence.
A Minimal Example
Here's what a tool-enabled request looks like in practice, calling Claude through SubToAPI's HTTPS endpoint:
curl https://api.subtoapi.app/v1/messages \
-H "Authorization: Bearer $SUBTOAPI_KEY" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4-5",
"max_tokens": 512,
"tools": [
{
"name": "get_stock_price",
"description": "Get the current price for a stock ticker",
"input_schema": {
"type": "object",
"properties": {
"ticker": { "type": "string" }
},
"required": ["ticker"]
}
}
],
"messages": [
{ "role": "user", "content": "What is AAPL trading at right now?" }
]
}'
Claude responds with a tool_use block requesting get_stock_price with {"ticker": "AAPL"}. Your backend fetches the real price, sends it back as a tool_result, and Claude writes the final answer using that number instead of an outdated or invented one.
Common Use Cases
Tool use shows up in almost every serious Claude integration:
- Data lookups — pulling current prices, inventory levels, or account details from an internal API
- Calculations — offloading math, date arithmetic, or unit conversions to deterministic code instead of trusting the model's reasoning
- Search and retrieval — querying a vector database or search index and feeding results back for grounded answers
- Action execution — creating a ticket, sending an email, updating a CRM record, or triggering a workflow
- Multi-step agents — chaining several tool calls together so Claude can plan and execute a task end to end, like "find the customer, check their order status, and draft a reply"
The common thread is that tool use turns Claude from a text generator into something that can interact with the real state of your systems.
Single Tool vs Multiple Tools vs Parallel Calls
You can give Claude one tool or a dozen. With more than one tool available, Claude picks the right one based on the description and schema you provide — which is why writing clear, specific descriptions matters more than most people expect. A vague description like "gets data" leads to wrong or missed tool calls; "get_order_status: look up the current shipping status for an order given its order ID" is unambiguous.
Claude can also request multiple tool calls in a single turn when the task calls for it — for example, checking inventory for three different products before answering a comparison question. Your integration needs to handle returning multiple tool_result blocks in that case, matched to the corresponding tool_use IDs.
Where SubToAPI Fits
If you already have Claude access and want to expose tool use through a stable HTTPS API — for a team, a product, or a script — SubToAPI wraps your existing access with an application API key (sub_live_...), so you don't need to manage Anthropic credentials directly in every service that calls Claude. It supports the same messages format shown above, including streaming and tool use, plus per-key usage metadata so you can see which parts of your app are driving token consumption. Plans start at €9/month for solo use, with team and scale tiers for shared seats — see /pricing for details, or /docs/tools for the full tool-use reference.
Getting Started
If you're new to tool use, start small: pick one tool, write a tight description and schema, and test with prompts that clearly require it and prompts that clearly don't, to confirm Claude only calls it when appropriate. From there, add tools incrementally and watch how Claude chains them. The /docs/quickstart guide walks through a first request, and /docs/messages covers the full request and response shape if you want to go deeper before building anything production-facing.
Questions
Is tool use the same as function calling in other APIs? Conceptually yes — you describe available functions with a schema, the model requests one with arguments, and you execute it and return the result. The message format and field names differ across providers, but the pattern is the same.
Does Claude always use a tool if one is available? No. Claude decides whether the user's request actually requires a tool. If it can answer directly from context or general knowledge, it will, even with tools defined in the request.
Can Claude call multiple tools in one response? Yes. When a task needs it, Claude can return several tool_use blocks in a single turn, and your code should return matching tool_result blocks for each before Claude continues.