When an agent misbehaves, the cause is often the tools rather than the model. A long list of overlapping tools with vague names forces the model to guess. A short list of well-defined tools gives it fewer ways to be wrong.
Principles
- One clear purpose per tool — named for the outcome ('create_refund_request'), not the mechanism.
- Typed, validated inputs — reject bad arguments with a message the model can act on.
- Return what the next step needs — concise, structured results rather than raw dumps.
- Make dangerous actions explicit — separate read tools from write tools, and require confirmation for the latter.
- Fail informatively — an error that says what to change lets the agent recover instead of looping.
Test tools like an API
Run scripted scenarios against the tools alone, then against the agent. If an agent picks the wrong tool in the same way repeatedly, rename or merge tools before touching the prompt. Review the tool list whenever a new capability is added; it tends to grow by accretion.