Deep Dive

Tool design layer - Brain Needs Hand: The Art of Tool Design for AI Agents

An AI model can plan all day, but it can't press a button. Tools are its hands. Here's how to build ones an agent can actually use.

Researched & written November 2026 ยท ~13 min read ยท Sources cited throughout

The short version

๐Ÿง  A brain with no hands

Ask an AI model to book you a meeting. On its own, it can't. A model only writes text. For anything else, it needs a tool.

Anthropic, the company behind Claude, says agents "are typically just LLMs using tools based on environmental feedback in a loop." In plain words: the model thinks, uses a tool, looks at what happened, and goes again.

Tools are the layer that connects that loop to real data and real systems. The model is the brain. Tools are its hands.

This is the next part of our series. Last time, we covered hub-and-spoke agents: one lead agent handing work to helper agents. This time, we zoom in on the hands.

๐Ÿ“– Words you'll see in this article

TermWhat it means
LLMLarge language model. The AI "brain" behind tools like ChatGPT and Claude.
AI agentAn LLM that works in a loop, using tools step by step until a task is done.
FunctionA named piece of code that takes inputs and does one thing.
API and endpointAn API is how one program talks to another. An endpoint is one action it offers.
JSON and JSON SchemaJSON is a simple text format apps use to pass data. JSON Schema describes which data is allowed.
TokenA small chunk of text, a word or part of one. Models read and charge by tokens.
Context windowEverything the model can see at once. It's measured in tokens and has a limit.
MCPModel Context Protocol, an open standard for plugging tools into AI apps.
CRMCustomer relationship management software, where sales teams track customers and leads.

๐Ÿงฐ What a tool is

In plain words: a tool is a function the agent can call. It either fetches information or takes an action. Think get_customer or send_email.

Good to know: Training data is the text a model learned from. It stops at a cutoff date. It never included your private systems.

๐Ÿ—‚๏ธ Types of tools

In plain words: some tools read, some write, some work things out, and some are whole agents.

TypeWhat it doesExamples
Read (retrieval)Fetches information. Changes nothing.Search, database query, CRM lookup, file read
Write (action)Changes something in the world.Send an email, create a ticket, update a record, make a booking
ComputeWorks something out.Run code, a calculator, convert data
Agent as toolHands a whole task to a helper agent.A "flights" spoke in a hub-and-spoke system

That last one is how a hub talks to its spokes, as in our hub-and-spoke article. OpenAI's Agents SDK has a shortcut for it, as_tool. It can "expose an agent as a callable tool without a full handoff."

Built-in tools vs your own

Good to know: Read tools are low risk. Write tools change real things, so they get extra checks later in this article.

๐Ÿ” Anatomy of a tool definition

In plain words: a tool definition is what the model reads before it picks a tool. It usually has four parts.

Good to know: The description is really a prompt. The model picks tools by reading it. Anthropic says descriptions "can collectively steer agents toward effective tool-calling behaviors." A vague one leads to wrong calls.

๐Ÿ”„ The tool-calling flow, step by step

In plain words: the model asks, your app checks and runs, and the model reads the answer.

  1. Your app sends the tool definitions along with the user's message.
  2. The model decides whether a tool would help. If so, it returns a tool call: a tool name plus arguments (input values).
  3. Your app checks the arguments. Then it runs the function.
  4. Your app sends the output back as a tool result. It carries the call's ID, so the model knows which request it answers.
  5. The model reads the result. Then it calls another tool or gives its final answer.

OpenAI's guide describes these same five steps.

Diagram of one tool call. The brain, the AI model, reads tool definitions, decides a tool would help, and writes a short request, such as get_customer with an email. The hand, your code, checks the inputs, runs the real function and sends back the result or a clear error. The model reads the result and answers or calls again. All the model knows about the tool is its name, description and input schema.
Figure 1. The tool-calling flow: the model asks, your code acts, the result goes back. Conceptual diagram with made-up data.

One round trip, step by step

Here's the same flow with our running example. A user asks: "What stage is Ana's lead at? Her email is ana@example.com."

  1. Your app sends the tool definition. It describes get_customer: "Find one customer by exact email." Its one required input is the email.
  2. The model asks for the tool. It replies: use get_customer with ana@example.com. The request gets an ID, like a tracking number.
  3. Your code runs it. It checks the email and looks Ana up in the CRM. It sends back her name, lead L-207 and status "contacted", tagged with the same tracking number.
  4. The model answers. "Ana Lima's lead is at the contacted stage."

Good to know: One reply can hold more than one tool call. Your app runs each one and sends back each result with its own ID.

๐Ÿ“ค Designing tool outputs

In plain words: everything a tool returns lands in the context window. Big results cost more and bury the useful parts.

Anthropic's Slack example shows the payoff. A detailed reply used 206 tokens. A concise one used 72.

Bar chart: a detailed Slack tool response uses 206 tokens and a concise one uses 72 tokens, about a third.
Figure 2. Same lookup, two response sizes. Example figures from Anthropic (2025).

Try this: Print one real result from your tool before you ship it. If it's hard for you to read, it's hard for the model too.

๐Ÿ› ๏ธ Tool design best practices

In plain words: a few small, clear tools beat a big, messy toolbox.

Does design really matter? In 2024, Princeton researchers tested a coding agent called SWE-agent. They kept one model, GPT-4 Turbo, and changed only its tools. On 300 real GitHub bugs, the full toolset fixed 18.0%. Without its custom file editor, it fixed 10.3%.

Bar chart of SWE-agent results on SWE-bench Lite with GPT-4 Turbo. Full toolset 18.0 percent. No search tool 15.7 percent. Editor without syntax check 15.0 percent. Viewer showing the whole file 12.7 percent. Search showing one result at a time 12.0 percent. No custom edit command 10.3 percent.
Figure 3. One model, six toolsets. Measured data from Yang et al. (2024), Table 3.

How many tools is too many?

Every tool definition sits in the context window before the agent starts. Anthropic shared an example with five MCP servers: 58 tools using about 55,000 tokens "before the conversation even starts." OpenAI suggests fewer than 20 tools at the start, calling it "just a soft suggestion."

Bar chart of tokens used by tool definitions per MCP server: GitHub 35 tools about 26K tokens, Slack 11 tools about 21K, Sentry 5 tools about 3K, Grafana 5 tools about 3K, Splunk 2 tools about 2K. 58 tools, about 55K tokens in total.
Figure 4. Where 55,000 tokens go. Approximate figures from Anthropic (2025).

Good to know: Need a big toolbox anyway? Load tools only when needed. Anthropic's Tool Search Tool lets the model search for the few it needs. In Anthropic's example, that cut up-front context from about 77,000 tokens to 8,700. In internal tests, it also raised accuracy (Figure 5).

A 2025 paper, RAG-MCP, saw a similar pattern. Picking relevant tools first more than tripled accuracy on its test: 43.13% against 13.62%.

Two charts. Left: accuracy on MCP evaluations rises from 49 to 74 percent for Claude Opus 4 and from 79.5 to 88.1 percent for Opus 4.5 with Tool Search. Right: context used before work begins falls from about 77K tokens to about 8.7K tokens.
Figure 5. Loading tools on demand. Anthropic's example (tokens) and internal testing (accuracy), not independently reproduced.

Test your tools on real tasks

How do you know your tools work? Test them. Anthropic builds a quick prototype, then runs an evaluation on tasks "grounded in real world uses."

More on testing in our guide to evaluating AI agents.

๐Ÿšซ Common tool design mistakes

In plain words: most weak tools go wrong in one of these nine ways.

MistakeWhat it looks likeThe fix
Vague names and descriptionsprocess_data, helper_toolverb_noun names and full descriptions
No "when not to use"The model calls it in the wrong situationsSay when not to use it
One tool per endpointA whole API wrapped as dozens of tiny toolsOne tool per real task
Overlapping toolssearch_customer and find_clientMerge them, or make the difference clear
Overloaded toolsOne tool with an action input doing many unrelated jobsSplit it by job
Loose schemasFree text where an enum belongs, nothing marked requiredTypes, enums and required fields
Bloated outputsFull API responses or raw HTMLOnly the fields that matter
Cryptic errorsA stack trace or "Error 500"A message the model can act on
Unguarded writesA delete or send tool with no checksInput checks plus human approval

Here's what a poor and a good definition look like side by side.

Two tool definitions side by side. The weak one is named get, described as Gets data, and takes vague user and type strings. The strong one is named get_customer, says when to use it, when not to and what it returns, gives an example email input, and limits response_format to concise or detailed.
Figure 6. A poor and a good definition for the same job. Illustrative example with made-up tools.

Good to know: Combining the steps of one job is fine, like schedule_event. Hiding unrelated jobs behind one action switch is not.

โš ๏ธ Error handling

In plain words: when a tool fails, the error goes back to the model. That message is its only clue about what to fix.

Good to know: Mark failures clearly. Anthropic's API and MCP both let a tool flag its result as an error, so the model knows the call failed.

๐Ÿ” Tool security and permissions

In plain words: a tool that can delete, pay or send can do damage. Limit what each one can do.

Good to know: MCP lets tools label themselves read-only or destructive. But apps "MUST consider tool annotations to be untrusted unless they come from trusted servers."

More in our articles on prompt injection and agent guardrails.

๐Ÿงช Worked example: a CRM lookup spoke

In plain words: one spoke, one read tool, one write tool, and a person in front of the write.

Let's put it all together. Picture a sales assistant built hub-and-spoke style. One spoke handles the CRM. It gets just two tools:

A user asks: "Mark Ana's lead as qualified. Her email is ana@example.com." Here's what happens:

  1. The spoke calls get_customer. It gets back lead L-207, status "contacted".
  2. It calls update_lead_status with L-207 and "qualified".
  3. Your app checks the inputs. Then it pauses and asks a person to approve.
  4. The person approves. The update runs and the call is logged.
  5. The spoke reports back to the hub.
Worked example of a CRM spoke with two tools. get_customer is a read tool that takes an email and runs right away. update_lead_status is a write tool that takes a lead ID and a status of new, contacted, qualified or lost, and needs approval. The spoke looks up Ana, gets lead L-207 with status contacted, requests a change to qualified, the app pauses for a person to approve or reject, and after approval the update runs, is logged and reported to the hub.
Figure 7. One read tool, one write tool with approval. Illustrative example with made-up data.

Good to know: update_lead_status is safe to retry. If the network drops and the call runs twice, the lead is still just "qualified".

๐Ÿ“‹ Tool design checklist

Run every new tool through this list before it ships.

โœ… Conclusion

The model gets the headlines, but tools decide what an agent can do. Give each tool one job, a clear name and an honest description. Keep inputs tight and outputs short. Return errors the model can fix. Fence in risky tools with few permissions, approval and a log. Get the hands right, and the brain looks a lot smarter.