AI glossary · Basic · Agents · Language models
Function Calling
Function Calling is a capability in which an AI model, when it needs to use a feature (function) of an external program to answer a question, produces a request in a fixed format saying "run this function with these values." The actual execution is handled not by the model but by the app using the model.
About this term
- Level
- Basic · Technical terms you often meet in AI news
- Category
- Perception & action
- Fields
- Agents, Language models
- Added
- 2026-10-08
How it works
The developer first tells the model which functions it can use. Each function comes with a description of its name, what it does and the values (arguments) it takes. When the user asks a question, the model decides whether to answer directly or use a function, and if needed outputs the function name and arguments in a fixed format such as JSON. The app actually runs the function as requested and passes the result back to the model, which then writes the final answer based on that result.
Why it matters
An LLM generates text only from what it learned in training, so it cannot know current outside information such as today's weather or order history in a company database, nor can it take actions such as sending email. Function Calling is the basic channel that connects the model to such external systems. Because the model issues requests in a fixed format rather than free-form text, programs can reliably read and handle them. AI agents that switch between multiple tools to get work done are also built on this capability.
Good to know
The key point is that the model does not run functions itself; it only creates execution requests. The model may invent functions that do not exist or fill in arguments wrongly, so the app must validate the format and values. For functions that spend money or delete data, it is safer to have a person confirm before execution. In the industry the term is used almost interchangeably with 'Tool Use', and MCP is a standard that lets many services share this way of connecting tools.
Example
If you ask the AI assistant in a travel app, "Show me trains to Busan next Saturday," the model, instead of making up an answer, creates a request to call a 'look up train timetable' function with departure, destination and date values. The app fetches the timetable from the actual booking system and returns it to the model, which turns it into easy-to-read sentences for the user. Major LLM APIs provide this capability by default, and workflow automation chatbots and coding agents call external functions the same way.