Tool use, also called function calling, is the ability of AI language models to invoke external tools, APIs, and functions as part of generating a response. Instead of only producing text, the model can decide to call a calculator, search the web, execute code, query a database, or interact with any external system. The model outputs a structured function call with parameters, the system executes it, and the result is fed back to the model. Tool use is fundamental to building AI agents and is supported by all major model providers. It enables models to overcome limitations like lack of real-time data, inability to perform precise calculations, and no access to private systems.
Frequently Asked Questions
What is tool use in AI?
Tool use (function calling) allows AI models to invoke external tools like APIs, calculators, databases, and web searches as part of generating responses, extending their capabilities beyond text generation.
How does function calling work?
The AI model outputs a structured request to call a specific function with parameters. The system executes the function, returns the result, and the model incorporates it into its response.