Medium · How a helper uses a tool
Three checks before anything runs
Before a tool call runs, the code around the model checks it three times. Is it the right shape, is this agent allowed this tool, and are the numbers sensible? Each check is a rule, written in code, not in the prompt. A tool call that fails any rule does not run.
Video coming
Example
The order agent asks send_order(item: paper towels, boxes: 300, supplier: towel supplier) shape every part is there pass allowed the order agent may order pass numbers Maple Mart orders 1 to 20 stop Nothing is sent. Milo sees why.
Try it Yourself
An order for 300 boxes is stopped. Which of the three checks stopped it? Type one word.
Exercise
Where should “never order more than 20 boxes” be written?