Tool calling: how an LLM uses your tools

When a model "calls a tool", what does it write, and who runs it?

Agents and tool calling · about 5 minutes

A model never runs your tool. It writes a short request, as text. Your code reads the request, runs the function and sends the result back. Then the model writes its answer.

Sketch: Xiaohei, inside a glass booth, passes a written request through a slot; a second Xiaohei in a tool belt opens the drawer, and the result comes back