← Table of Contents · Page 162 of 868
DESIGNING GOOD TOOLS
Part 9 of 10
CHAPTER SUMMARY
Design tools for a model reader: clear verb-noun names and descriptions that say when to use and when not to use the tool.
Prefer small composable tools and limit what each returns.
Write error messages that explain the problem and suggest a fix so the agent can correct itself.
Make action tools idempotent using set operations, check-before-write, or idempotency keys, because agents retry.
Add rate limits and quotas to guard against loops, cost, and overload.
KEY TERMS REVIEW
Composable: able to be combined from small parts.
Paging: returning results in small pages.
Idempotent: safe to call more than once with the same effect.
Idempotency key: a unique label that lets a tool recognize a repeat request.
Rate limit: a cap on how often something may be used.
Quota: a cap on total usage.
Validation error: an error caused by wrong input.
Advertisement
Read Aloud:
0:00 / 0:00