Definition
Tool use (also function calling) lets a language model call external functions or APIs to retrieve information or perform actions during generation. The developer registers tools with their schemas; the model decides when to call them based on the user's request. Tool use powers AI agents, grounded answering (web search, database lookup), and AI-assisted workflows. Available in OpenAI, Anthropic, and Google APIs.
Example
User asks 'What's the weather in Tokyo?' → Model calls a get_weather tool → Tool returns data → Model produces a natural-language answer using the data.
When to use
Agents, grounded answering, AI-augmented workflows, anywhere the model needs fresh or domain-specific data.
Also known as
function calling