Lesson 3 · 11 min
Tool use done right
Tools are the agent's hands. Bad tool design wrecks more agents than bad models.
What separates a good tool from a bad one
Tools are JSON-schema'd functions the LLM can call. The model never executes them — your code does. So tools are an API contract between you and the model.
Four qualities of a good tool:
- Single purpose.
search_web(query), notdo_anything(action, params). - Strict schema. Required fields, descriptions, no
anytypes. - Idempotent when possible — re-runs return the same result.
- Honest errors. Return structured errors the model can read and reason about.
- Cheap to call. A tool that takes 10 seconds turns a 5-step loop into a coffee break.