Tool Calling
Tool calling: the request loop, who runs the tool, validation, loop limits and confirming risky actions.
5 notes · 10 min total
- 1How It WorksThe tool calling loop: describe your functions, the model asks for one, your code runs it, the result goes back, and the loop repeats until a final answer.2 min
- 2Who Runs ItThe model only asks for a tool call. Your code decides whether to act and runs it, which makes your code the safety boundary.2 min
- 3ValidationThe three checks to run before any tool executes (schema, authorization and sanity) and how to send a failed check back to the model.2 min
- 4LimitsWhy a tool calling loop needs an iteration cap, a budget cap and repetition detection, and what each one catches.2 min
- 5Risky ActionsConfirm before any tool call that sends, deletes, pays or publishes, why a preview step also stops prompt injection, and why tool descriptions are prompts.2 min