Last updated: April 5, 2026 · Prompting & Usage · by Daniel Ashford

What is Function Calling / Tool Use?

QUICK ANSWER

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

API (Application Programming Interface)
The technical interface that lets your software send prompts to an LLM and receive responses.
AI Agent
An LLM that can autonomously plan, use tools, and take actions to complete complex tasks.
Prompt
The text input you send to an LLM to get a response.

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.

View Leaderboard →Our Methodology
← Browse all 47 glossary terms
DA
Daniel Ashford
Founder & Lead Evaluator · 200+ models evaluated