Pattern · Agents
Task-shaped tools
Give the agent a few clear tools shaped around tasks, with strict schemas, instead of wrapping every API endpoint.
Say it in the interview
I design tools around tasks, not endpoints: a handful, each with a clear name, a description that says when to use it, and a strict schema my code validates. Reads run freely; anything that moves money or reaches a customer needs approval.
When to use it
- Any agent or tool-calling system
- An API with many overlapping endpoints
How it works
- Raw API, 14 endpoints → group by task → 3 task tools
- 3 task tools → Clear names and descriptions (when to use each)
- 3 task tools → Strict schemas (types, enums, required fields)
- 3 task tools → Read tools run freely
- 3 task tools → Action tools need approval
Trade-offs
- Fewer wrong tool choices and shorter runs
- More design work up front
Pitfalls interviewers probe
- Dozens of overlapping tools
- Free-text parameters where an enum would do
- Letting the model act without validation