Skip to content

Designing Tools for AI Agents

How to write tools agents use well: clear names, precise descriptions, sensible inputs and informative outputs.

Editorial team 1 min read

Tools are the agent's hands. Their design strongly affects how well the agent performs.

Clear Names and Descriptions

The model chooses tools from their names and descriptions. Explain what the tool does, when to use it, when not to, and what it returns. Write as you would for a new colleague.

Simple, Well-Typed Inputs

Use descriptive parameter names, types, enums for fixed options, and examples. Avoid parameters that are easy to confuse.

Do One Thing Well

Tools with a clear purpose are chosen more reliably than Swiss-army tools with many modes. But avoid dozens of near-identical tools either — consolidate where it simplifies.

Useful Outputs

  • Return what the model needs, not everything available.
  • Use readable formats and meaningful identifiers rather than opaque IDs.
  • Paginate or truncate large results, and say so.

Helpful Errors

"File not found: /src/app.py. Did you mean /src/main.py?" helps an agent recover; a stack trace doesn't.

Match Tools to Tasks

Design tools around what the agent needs to accomplish, not just around existing API endpoints.

Test With the Model

Watch agents use your tools. Misused tools usually point to unclear descriptions or awkward interfaces; iterate.

More in Agent harnesses

All Agent harnesses guides →
Agent harnesses Guide · 2 min

What Is an Agent Harness?

The software around a language model that turns it into an agent: the loop, tools, context, permissions and memory.

Agent harnesses 2 min read 27 Sep 2025

Agent harnesses Guide · 1 min

The Agent Loop Explained

The core cycle every agent runs: think, call a tool, observe the result, repeat — and how the loop knows when to stop.

Agent harnesses 1 min read 26 Sep 2025

Agent harnesses Guide · 1 min

Context Management in Agent Harnesses

How agents stay effective over long tasks: what to keep in context, what to summarise, and what to store outside.

Agent harnesses 1 min read 24 Sep 2025

Agent harnesses Guide · 1 min

Permissions and Approval in Agent Harnesses

Controlling what agents can do on their own: allow lists, approval prompts, forbidden actions and escalation.

Agent harnesses 1 min read 23 Sep 2025