← Blog

What Is Claude Tool Use? A Clear Explanation

2026-09-16 · 5 min read · SubToAPI Team

Claude tool use is a feature that lets Claude call external functions — like a weather API, a database query, or a calculator — as part of a conversation, instead of just generating text. You describe the tools available (their names, purposes, and expected inputs), and Claude decides when to use one, generates the correct arguments in structured JSON, and hands control back to your application to actually run the function and return the result.

In short: tool use turns Claude from a text generator into a system that can take actions. It's the mechanism behind AI agents that book meetings, look up live data, query internal systems, or chain multiple steps together to complete a task.

Why Tool Use Exists

Language models are trained on static data and can't natively access the internet, your database, or today's date. Tool use closes that gap. Instead of hallucinating an answer, Claude can say "I need to call the get_weather function with location: Berlin" and wait for real data before responding.

This matters for anything beyond simple Q&A:

Without tool use, you'd have to manually parse free-text responses and guess what the model "meant." With tool use, the model returns structured, machine-readable calls you can execute directly.

How Claude Decides to Use a Tool

You provide Claude with a list of tool definitions in your API request. Each definition typically includes:

When Claude receives a message, it evaluates whether answering requires information or an action it doesn't have. If so, it responds with a tool call — not a final answer, but a structured request naming the tool and the arguments to use. Your application executes that function, then sends the result back to Claude in a follow-up message. Claude uses that result to produce the final, grounded response to the user.

A simplified request/response cycle looks like this:

// 1. You define a tool
{
  "name": "get_weather",
  "description": "Get current weather for a location",
  "input_schema": {
    "type": "object",
    "properties": {
      "location": { "type": "string" }
    },
    "required": ["location"]
  }
}
// 2. Claude responds with a tool call instead of plain text
{
  "type": "tool_use",
  "name": "get_weather",
  "input": { "location": "Lisbon" }
}
// 3. You run the function, then send the result back
{
  "type": "tool_result",
  "content": "18°C, partly cloudy"
}

Claude then generates a final answer like "It's currently 18°C and partly cloudy in Lisbon" using the real data instead of guessing.

Single Calls vs. Multi-Step Chains

Tool use isn't limited to one call per turn. Claude can:

This chaining is what powers agentic workflows: research assistants that search, then summarize, then save notes; support bots that look up an order, check a policy, and issue a refund — all without a human manually gluing each step together.

What Tool Use Is Not

It's worth being precise about scope:

Using Tool Use Through an API

Tool use is an API-level feature, exposed through Claude's Messages API with a tools parameter in the request body. If you're building on Claude programmatically — whether through direct API access or a proxy service — the pattern is the same: define tools, send them with your request, handle the tool_use response, and return a tool_result.

If you're using a service like SubToAPI to turn your existing Claude access into an HTTPS API with application-specific keys, tool calling works the same way through the standard /v1/messages endpoint — you send your tool definitions, get back structured tool_use blocks, and execute them in your own code. This is useful if you want usage metadata, streaming, and per-project API keys without managing separate billing relationships. See the tool use docs and the messages API reference for the exact request format, or check the quickstart to get a key running in minutes.

A Simple Example

const response = await fetch("https://api.subtoapi.app/v1/messages", {
  method: "POST",
  headers: {
    "Authorization": `Bearer ${process.env.SUBTOAPI_KEY}`,
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    model: "claude-3-5-sonnet-20241022",
    max_tokens: 1024,
    tools: [
      {
        name: "get_weather",
        description: "Get current weather for a location",
        input_schema: {
          type: "object",
          properties: { location: { type: "string" } },
          required: ["location"]
        }
      }
    ],
    messages: [
      { role: "user", content: "What's the weather in Tokyo?" }
    ]
  })
});

Claude responds with a tool_use block instead of plain text, your code calls the actual weather API, and you send the result back as a tool_result in the next message.

Getting Started

Tool use is a core primitive once you move past simple chat interfaces into building anything that acts on real data. Start small: one tool, one clear schema, one execution path. Once that works, add more tools and let Claude chain calls as needed. You can test this pattern against your own key by signing up at /signup and reviewing pricing for Solo, Team, and Scale plans if you want a hosted API layer with usage tracking built in.

questions

Is Claude tool use the same as function calling in other LLMs? Conceptually yes — it's Claude's version of the pattern popularized as "function calling." You define callable functions with schemas, and the model returns structured arguments instead of free text.

Does Claude execute the tool itself? No. Claude only decides which tool to call and with what input. Your application is responsible for actually running the function and returning the result.

Do I need a special model to use tool use? No — tool use is supported by Claude's standard chat models through the Messages API's tools parameter; you don't need a separate "tool model."

Turn your Claude access into an HTTPS API

SubToAPI gives you application API keys, streaming, tool use and usage insights on top of your existing Claude access — set up in minutes.

Start free  Read the quickstart →