Tool calling lets the model use functions you provide instead of answering from memory.
You describe each tool with a name, a purpose and a parameter schema.
The model decides when one is needed and produces the arguments to call it with.
It never runs anything, since your code receives the request and executes it.
The result is passed back and the model continues with that information in hand.
This is how a model reaches live data, does exact arithmetic and takes real actions.
It converts a text generator into something that can affect the world, which is the point of agents.
The description is the whole interface, so a vague one produces a badly chosen tool.
Write it for a competent stranger, saying when to use it and when not to.
Fewer tools works better, and beyond roughly twenty selection quality falls off.
Parameter descriptions matter as much as names, especially for formats such as dates.
Validate every argument before executing, because the model can produce plausible nonsense.
Never let a tool take a destructive action without a check outside the model.
Return errors as readable text, since the model can often correct itself and retry.
Everything a tool returns is untrusted input and can carry an injection.