ModelRefs / Function Calling — AI Glossary
Function Calling — AI Glossary
A model capability that emits structured JSON to invoke external tools or APIs instead of free-form text. Function calling turns LLMs into agents.
Overview
Function calling turns LLMs into agents. The model receives a list of JSON schemas describing available tools and decides when and how to call them. Underpins MCP, OpenAI tools API, and Anthropic's tool use. Parallel function calling allows multiple tool calls in a single response.
Reference details
| Topic | agents |
|---|---|
| Also known as | tool calling, tool use API |
| Last reviewed | 2026-06-24 |
Related terms
Example: What the model actually emits
You pass a schema for get_weather(city, unit). Asked “Is it colder in Oslo or Lisbon?”, the model does not answer from memory — it emits two structured calls, your code executes them, and you return the results for the model to compare. The model never runs anything itself; it only produces the arguments.
// You send the schema; the model returns calls, not prose.
{ "tool_calls": [
{ "name": "get_weather", "arguments": { "city": "Oslo", "unit": "c" } },
{ "name": "get_weather", "arguments": { "city": "Lisbon", "unit": "c" } }
] }
// Your runtime executes both, appends the results, and asks again.
Commonly confused with
Function calling does not execute anything. The model only produces a name and arguments — running them, sandboxing them and validating them is entirely your responsibility. Treating a tool call as pre-authorised is the root of most agent security incidents.
When to use it
Reach for it when:
- The answer depends on live data the model cannot hold
- You need a typed, machine-parseable action rather than prose
- Several independent lookups can run in parallel in one turn
Reach for something else when:
- You only need a structured answer, not an action — use structured output instead
- The tool surface is large and unfiltered; models pick wrong tools as the list grows
- The call has side effects and nothing stands between the model and production
Referenced by
This term is used by the following ModelRefs references:
Continue your research
Use these connected ModelRefs sections to compare alternatives, inspect implementation paths, and review the evidence and governance boundaries relevant to Function Calling — AI Glossary.
Frequently asked questions
What is Function Calling?
A model capability that emits structured JSON to invoke external tools or APIs instead of free-form text.
Is Function Calling the same as tool calling?
Yes — tool calling, tool use API are common aliases for Function Calling.
What concepts are related to Function Calling?
Closely related concepts include tool use, agent, mcp, json mode.