Last updated: April 5, 2026 · Prompting & Usage · by Daniel Ashford
What is Function Calling / Tool Use?
The ability of LLMs to invoke external tools, APIs, and databases.
Definition
Function calling allows language models to invoke external functions, APIs, or tools during a conversation. Instead of only generating text, the model can decide when to call a function, format arguments, and use returned data.
How It Works
When you define available functions, the model autonomously decides when calling one would be more helpful than generating text. This enables access to real-time data, calculations, databases, and external systems. Function calling is the foundation of AI agents.
Example
A financial assistant: User asks "What is Apple stock price?" The model calls get_stock_price(symbol="AAPL"), receives $187.50, and responds with the live price.
Related Terms
See How Models Compare
Understanding function calling / tool use is important when choosing the right AI model. See how 12 models compare on our leaderboard.