What is tool calling in AI?
Tool calling, also called function calling, is the ability of an AI model to request that an external tool or API be run, such as searching a database, creating a ticket or issuing a refund, by outputting a structured call that the application executes and returns results from.
How it works
- Tools are described to the model (name, inputs).
- The model decides to call one and outputs arguments.
- The app runs the tool.
- Results go back to the model.
- The model continues or answers.
Example
get_order_status(order_id="4412") → "shipped" → "Your order shipped yesterday."
Safety
Limit tools by permission, validate inputs and require approval for risky actions.
