What is Tool calling?
Tool calling lets a language model request that your software run a defined function, such as a database lookup or an API call, and then use the result in its next step.
In more detail
The model never executes anything itself. You describe each tool by name, purpose and input schema. When the model decides one is needed, it returns a structured request such as get_invoice with an ID. Your code validates the arguments, checks permissions, runs the call and feeds the result back. That boundary is where control lives. Validate inputs, scope credentials per tool, apply stricter approval to write tools than read tools, and log every call. Too many tools confuse a model, so expose only what the task needs. Names and descriptions matter: a vague description causes wrong calls more often than any weakness in the model.
Example
A scheduling agent has three tools: check_availability, book_slot and send_confirmation. It can read the calendar freely, but book_slot only works inside business hours and for services the customer is eligible for.