Tools & Capabilities
An agent without tools is just a chatbot. Each tool you add unlocks a new dimension of capability. Here is how tools work, what categories they fall into, and how to choose the right ones for your agent.
Three Categories of Tools
Every tool an agent can use falls into one of three categories. Understanding these categories helps you design agents that have the right capabilities for the job:
Give the agent access to information beyond its training data. Without these, the agent can only answer from what it learned during training — which is frozen in time.
Let the agent take real actions — send emails, create records, trigger workflows. These are what separate an agent from a chatbot. Without action tools, the agent can only talk about doing things.
Enable the agent to operate without human prompting — triggers, schedulers, monitors. These turn a reactive agent into a proactive one that works while you sleep.
How Tools Are Defined (Real Code)
In the Claude API, each tool is defined as a JSON schema. The description field is what Claude reads to decide when to use the tool:
{
"name": "web_search",
"description": "Search the web for current information. Use when the user asks about recent events, live data, or anything not in your training data.",
"input_schema": {
"type": "object",
"properties": {
"query": {
"type": "string",
"description": "Search query"
}
},
"required": ["query"]
}
}
# An action tool: send email
{
"name": "send_email",
"description": "Send an email. Use when the user asks to communicate with someone via email.",
"input_schema": {
"type": "object",
"properties": {
"to": { "type": "string" },
"subject": { "type": "string" },
"body": { "type": "string" }
},
"required": ["to", "subject", "body"]
}
}
Tools Compound in Value
Each tool you add does not just add one capability — it multiplies them. Tools work together in ways that unlock tasks no single tool could handle:
Choosing the Right First Tool
The right first tool depends on your agent's job. Match the tool to the most critical capability gap:
Why a Calculator Tool Exists
This surprises people: why does a powerful AI need a calculator? Because LLMs do not actually compute — they predict the most likely next token. For simple math, they are usually right. For precise calculations, they hallucinate:
Answer: 42,618,312
Wrong. (Actual: 42,618,312... sometimes right, sometimes not. You cannot trust it.)
calculator(47832 * 891)Returns: 42,618,312
Always correct. Deterministic, guaranteed.
The agent's intelligence is in knowing when to delegate to a tool. The best agents are not the ones that try to do everything themselves — they are the ones that route each sub-task to the right tool.
Equip Your Agent with Tools
Here is how to define tools in the Claude API. Each tool needs a name, description (tells Claude WHEN to use it), and an input schema (tells Claude WHAT to send):
# Tools are JSON schemas that tell Claude what it can do
tools = [
{
"name": "lookup_customer",
"description": "Look up a customer by email. Use when the user mentions their account, billing, or subscription.",
"input_schema": {
"type": "object",
"properties": {
"email": {"type": "string", "description": "Customer email address"}
},
"required": ["email"]
}
},
{
"name": "web_search",
"description": "Search the web. Use when the user asks about current events, prices, or information not in the knowledge base.",
"input_schema": {
"type": "object",
"properties": {
"query": {"type": "string", "description": "Search query"}
},
"required": ["query"]
}
},
]
# Pass tools to Claude — now it's an AGENT, not a chatbot
response = client.messages.create(
model="claude-sonnet-4-6",
max_tokens=1024,
tools=tools, # ← this is what makes it an agent
messages=[{"role": "user", "content": "What plan is jane@acme.co on?"}]
)
# Claude will respond with a tool_use block:
# {"type": "tool_use", "name": "lookup_customer", "input": {"email": "jane@acme.co"}}