Same topic, related formats. Practice these next.
Same topic, related formats. Practice these next.
Atomic tools keep retries safe and failures traceable. One operation per tool means a failed call retries cleanly and the broken step is obvious from its own observation.
Imagine a robot helper that follows your instructions. You can give it one big instruction like "go to the shop, buy milk, and pay with my card," or three small ones. If the big instruction fails halfway, you cannot tell what went wrong. Did it never reach the shop? Did it grab the milk but fail to pay? And if you simply tell it to try again, it might buy a second carton it already has. Small instructions fix both problems. Each one either finishes or does not, so you always know which step broke. And repeating a small step is safe, because you only redo the exact thing that failed. An agent's tools work the same way. One job per tool keeps retries clean and makes failures easy to pinpoint.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example. Click to expand.
Everything you need to truly understand this topic: intuition, mechanics, step by step explanation, code, formulas, and worked example.
Everything important, quickly.
Open by stating atomicity is about failure semantics, not speed. Walk the composite read plus write retry hazard, then show how splitting it fixes idempotency and error attribution. Dismiss the speed and token distractors, then acknowledge the over decomposition tension and why tool names drive selection.
| Property | Atomic tool | Composite tool |
|---|---|---|
| Retry on failure | Repeats one operation safely | May re-run side effects and double-execute |
| Error attribution | Failure maps to one named step | One opaque error for several causes |
| Idempotency | Achievable per operation | Must hold across the whole bundle |
| Schema cost | More tools, larger schema | Fewer tools, denser per-tool logic |
| Tool selection risk | Too many overlapping tools confuse the model | Fewer choices but coarse control |
Real products, models, and research that use this idea.
What an interviewer would ask next. Try answering before peeking at the approach.
Red flags and common mistakes that signal junior thinking. Click to expand.
Picking the speed or token-count answer. Atomicity is not about raw performance. It is about safe retries and being able to blame a failure on one named operation.
The night-before-the-interview bullets. Scan these on the way to the call.
Primary sources. Skim if you want the original framing.