Tools & Protocols
Tools Agents Can Actually Use
10 min+100 XPStep 1/10
Design for the model's mistakes
Your tool will receive wrong arguments — malformed dates, hallucinated IDs, parameters inverted. The question is whether a mistake costs one retry or burns the whole trajectory.
Engineering rules:
- Idempotent by default — same call twice should be safe. The agent retries; design so retries don't double-charge, double-send, double-create.
- Task-shaped, not API-shaped —
get_customer_recent_orders(email)beats exposingquery_table(table, where_clause)and hoping the model writes SQL. Model your tools around what the agent is trying to accomplish. - Narrow blast radius —
draft_emailandsend_emailare different tools with different permission gates, not asend: booleanflag the model might flip.
insight
A destructive side effect hidden behind a parameter flag is one hallucinated 'true' away from an incident. Split tools by blast radius.