What makes a good tool for an agent?
Agents and tools · Intermediate 3
Short answer
A clear name and description that say when to use it, a small strict input schema with meaningful parameter names, outputs that are concise and useful to a model (not raw dumps), helpful error messages the agent can act on, and the least power needed. Fewer, well-designed tools that match tasks beat many thin wrappers around API endpoints.
Deeper answer
Write tool descriptions as you would brief a new colleague: what it does, when not to use it, and examples of inputs. Return identifiers the agent can use in the next call, and paginate or truncate large results with a note saying more exist.
Then test tools with the model: watch traces for wrong tool choices or bad arguments, and fix the description or schema rather than adding more prompt instructions. Anthropic's guide to writing tools for agents is a good reference.
What a strong answer covers
- Clear name and description of when to use it
- Small strict input schema
- Concise, useful outputs
- Actionable error messages
- Least privilege and fewer, task-shaped tools
Answer it out loud in the mock interview about 1.5 min
Follow-ups to expect
- Why might many fine-grained tools make an agent worse?
- What should a tool return on error?
Common mistakes
- Wrapping every API endpoint as a tool
- Returning huge raw payloads
Learn it
- What are common failure modes of agents, and how do you guard against them?
- What kinds of memory can an agent have, and how do you implement them?
- Your agent ran overnight and ran up a large API bill. What probably happened, and what do you change?
- How would you design a harness for an agent that has to work on one task for several hours?
- What is the difference between an agent and a workflow?
- What are computer-use or browser agents good for, and what are their risks?
- What is context engineering, and why does it matter for agents?
- An agent completes a task correctly most of the time but sometimes goes badly wrong. How do you debug it?
- Design an agent that handles refund requests for an online store.
- You changed your agent's harness. How do you prove the change made it better?
- What are verification gates in an agent harness, and how would you add them to a coding agent?
- How does tool calling work?
- When should an AI agent ask a human for approval before acting?
- Explain state, nodes, edges and checkpoints in LangGraph.
- What are planning and reflection in agents, and when do they help?
- Two coding agents use the same model, but one solves far more of your tasks. Why could that be, and how would you find out?
- What is an agent harness, and what is harness engineering?
- What is the Model Context Protocol, and why does it matter?
- When is a multi-agent system worth it, and what are the risks?