Designing tools for agents
For engineers
Tool names, descriptions, schemas, errors, compact outputs, side effects and testing tools with real agent runs
110 questions across four stages: Understand, Apply, Solve and Judge.
Try 5 questions
Practice items, not counted towards your mastery. No account needed.
Check yourself · 1 of 5
A tool called search has the description "Searches things." What is the main risk?
Check yourself · 2 of 5
A search tool's backend is down. What should the tool return?
Check yourself · 3 of 5
A tool returns 20 of 312 matching tickets and says nothing about the rest. What is the likely result?
Check yourself · 4 of 5
Run logs show search_orders is followed by get_order on the first result almost every time. What is the best design change?
Check yourself · 5 of 5
An agent's call to a payment tool times out, so it calls again. What prevents a double charge?
Topics
- Tool names, descriptions and parameter schemas4 min read · Writing definitions an agent picks correctly: clear names, when-to-use guidance, typed and constrained parameters, examples
- Tool errors that help the agent recover4 min read · Error messages that say what went wrong and what to try next, instead of stack traces or silent empty results
- Compact, high-signal tool outputs5 min read · Pagination, filters, truncation with hints, readable names instead of opaque ids, and concise versus detailed response modes
- Fewer, task-shaped tools5 min read · Consolidating many API-shaped tools into task-level ones, and tool search or deferred loading for large toolsets
- Side effects, idempotency and dry runs5 min read · Designing write tools with idempotency keys, dry-run modes, confirmations and reversible actions
- Testing tools with real agent runs5 min read · Evaluating tool definitions on realistic tasks, reading transcripts for misuse and iterating on descriptions
Start here
- Writing effective tools for AI agents (Anthropic) (opens in a new tab)ArticleFree
Naming, namespacing, response design and evaluation loops for agent tools, from a team that builds them.
- Introducing advanced tool use (Anthropic) (opens in a new tab)ArticleFree
Tool search, programmatic calling and tool use examples for large toolsets.
- Define tools (Claude API docs) (opens in a new tab)DocsFree
How a tool definition is structured: name, description, input schema and examples.
Scenarios
Helps to know first
110 questions · last verified 2026-12