Skip to content
Preptima
hardDesignConceptMidSeniorStaff

How do you design the tools an agent calls?

5 min readUpdated 2026-08-15

Answer

Short answer

Give each tool one narrow purpose with a self-describing schema, return failures as structured results the model can act on rather than raising, take an idempotency key on anything that mutates, and put validation and authorisation in the executor because arguments produced by a model are untrusted input.

Was this answer helpful?

Likely follow-ups

  • You have thirty tools and the agent keeps choosing the wrong one. What do you change?
  • How do you keep a tool result from consuming half the context window?
  • A retrieved document instructs the model to call your refund tool. What stops it?
  • How would you version a tool whose schema must change for existing running agents?

Related questions