Track 03 · Agents & toolsLesson 03 of 12

Designing tools a model can use well

Names, descriptions and schemas decide whether the agent picks the right tool.

What you'll be able to do

What you'll be able to do

01
  1. Design a tool as a product for the model: a portable name, a description that says when and when not to use it, and typed, bounded parameters.
  2. Choose the right granularity for a toolset, consolidating reads into workflow-shaped tools while keeping each write separate and explicit.
  3. Implement tool returns that are concise, paginated and chainable, and errors that tell the model exactly how to recover.
  4. Implement idempotent write tools that are safe to retry.
  5. Diagnose tool-selection failures caused by tool count, overlap or vague descriptions, and apply fixes including allow-lists and tool search.
  6. Defend a curated toolset over auto-generated API wrappers in a design review, with an eval plan.
Before you start

Before you start

The short version

The short version

A tool is a function your code exposes to the model: a name, a description, an input schema and a result. The model never sees your implementation. It chooses tools and fills arguments from the definition alone, so the definition is the user interface and the model is the user. Good tools have unambiguous names, descriptions that say when to use them and when not to, parameters with precise types, enums, formats and bounds, results that return only what the next step needs, and errors that tell the model how to fix its call. Fewer, workflow-shaped tools beat many thin API wrappers on both accuracy and tokens. Write tools are separate, idempotent and explicit, because that is where authorisation and approval attach. You find out whether a tool is good by running evals, not by reading it.

Key takeaways:

  • Every tool definition is sent on every step. Tool count is a token cost and a selection-accuracy cost.
  • The description is the most important field. "When not to use" is what separates similar tools.
  • Do not ask the model for values the system already knows (acting user, tenant, idempotency context). Inject them.
  • Errors are part of the interface. A good error message is a free retry with the right arguments.
  • Tool annotations such as "read-only" are hints for clients, not security controls.

Pro lesson

The rest of this lesson is in Pro.

The mental model, worked example, field note, failure table, exercise and self-check, with the voice tutor.

Pro opens this stage

Stage 4 · Agents that act safely
  • 7 lessons, with the voice tutor
  • Lab · Find the intake agent's failed writes, graded here

Also in Pro

  • Every stage and specialisation, in full
  • Every lab and every role project
  • Halden weeks 2–10, on your record
  • Every drill, live in the playground
  • All solutions, plus the server judge
  • Lab Assistant and every Teach with AI