Function Calling / Tool Use — definition
Function Calling / Tool Use is an LLM capability where the model detects when an external tool is required, formats a structured JSON function call, and uses the returned tool output to complete its response.
Expanded Explanation
Enables LLMs to perform exact mathematical calculations, query live SQL databases, execute web searches, and trigger third-party API actions.
Analogy & Mental Model
Function Calling is like a manager handing a complex accounting problem to their CFO and receiving exact calculated numbers back before finishing a strategic deck.
Why It Matters & Where It's Used
Tool Use transforms LLMs from static text generators into active problem-solving engines powering modern AI agents.
Concrete Real-World Application
ChatGPT calling a live WebSearch tool to pull weather reports before generating travel recommendations.
Function Calling / Tool Use vs Text Generation
Text generation predicts words based on probabilities, whereas tool use executes external deterministic software code.
How It Works & Key Components
Executes via JSON schema declaration and model tool-call generation.
1Tool Specification
Providing the LLM with JSON schemas detailing available functions and arguments.
2Tool Call Generation
The LLM emitting a structured `tool_calls` JSON payload instead of plain text.
3Result Feeding & Generation
Executing the tool and feeding the output back into the LLM context to synthesize a final answer.
Frequently Asked Questions
Q:Do all major LLMs support Function Calling?
Yes, OpenAI, Anthropic Claude, Google Gemini, and open-source models like Llama 3 natively support structured function calling.
Get cited across ChatGPT, Perplexity & Gemini with citedby
Optimize your brand’s AI visibility score, track Share of Model across buyer prompts, and turn zero-click search into your highest-converting pipeline source.
Explore citedby Platform