Function Calling
A capability that lets language models request structured tool or API calls instead of only generating plain text.
Function calling allows an LLM to output structured arguments for a predefined tool or API instead of just free-form text. Rather than saying "I would search for weather," the model can produce a machine-readable call like getWeather({ city: "Dubai" }).
This makes language models dramatically more useful in applications because they can trigger real actions: look up records, send emails, fetch web results, run calculations, or create support tickets.
Where Function Calling Helps
- Tool use — search, calculators, CRMs, databases, and APIs
- Structured outputs — reliable JSON-like arguments instead of prose
- Automation — trigger workflows based on natural language input
- Agents — enable models to observe and act repeatedly
Function calling is now a standard building block for assistants and agents. It pairs naturally with system prompts, schema validation, and runtime safeguards to make tool use more reliable.