Tools transform an LLM from a text generator into an agent that can act on the world. By giving models access to well-defined functions --- APIs, code interpreters, search engines, file systems --- you dramatically expand what they can accomplish. Anthropic’s research emphasizes that tool design is one of the highest-leverage investments you can make in an agentic system.
How Agents Use Tools
An agent follows a loop: it reasons about what to do next, selects and invokes a tool with specific arguments, observes the result, and then reasons again. This observe-think-act cycle continues until the task is complete or the agent decides no further tool calls are needed.
The model does not execute tools directly. Instead, it emits a structured tool-call request (typically a function name and JSON arguments), and the host application executes the call and returns the result. This separation keeps execution under the application’s control.
Tool Design Principles
Well-designed tools make agents significantly more reliable. Poor tool design is one of the most common sources of agent failure.
- Keep tools focused. Each tool should do one thing well. Prefer
search_customers(query)over a multi-purposedatabase_operation(action, table, query, ...)function. - Use clear, descriptive names. The model selects tools largely based on their names and descriptions.
get_weather_forecastis far better thanapi_call_3. - Document parameters thoroughly. Include types, constraints, valid ranges, and examples in the parameter descriptions. The model reads these descriptions to decide how to fill in arguments.
- Return structured, minimal output. Give the agent what it needs to reason about the result without flooding the context window. Summarize large payloads when possible.
- Handle errors gracefully. Return clear error messages that help the model recover, rather than raw stack traces or empty responses.
Common Tool Categories
| Category | Examples |
|---|---|
| Information retrieval | Web search, database queries, RAG lookups, API reads |
| Code execution | Sandboxed interpreters, shell commands, notebook runners |
| File operations | Read, write, list, and transform files |
| Communication | Send emails, post messages, create tickets |
| External services | Payment processing, deployment triggers, third-party APIs |
Investing in Your Tool Layer
Anthropic notes that many teams underinvest in tool quality. Spending time on clear documentation, helpful error messages, and thoughtful argument schemas often yields greater reliability improvements than prompt engineering alone. Think of tools as the API surface your agent consumes --- the same design principles that make a good developer API apply here.