Function calling, also called tool use, is the mechanism that lets a language model ask for an action. The application tells the model which functions exist and what each one does. The model replies with a structured request naming a function and its arguments, the application runs it, and the result goes back to the model. The model never runs anything itself. Function calling is the building block under agents, connectors and MCP, and it is where permissions and approvals belong.
What function calling means
Before function calling, getting a model to trigger software meant asking for text and parsing it, which broke whenever the wording changed. Function calling makes the request structured. Each function is described with a name, a plain-language description and a schema for its inputs.
Take an illustrative commercial example. A team defines a tool called `find_open_deals` that takes an account name. A seller asks: "What is still open with this client?" The round trip runs like this:
- The application sends the question and the tool definition to the model.
- The model replies with a tool call: `find_open_deals`, account name filled in.
- The application checks the request, queries the CRM and returns the result.
- The model writes its answer from that result.
In Anthropic's API the model's reply carries a `tool_use` stop reason, and the application returns a `tool_result` that references the call. OpenAI's API follows the same pattern with different field names.
| Term | Meaning |
|---|---|
| Tool or function definition | Name, description and input schema the model reads |
| Tool call | The model's structured request to run one function with given arguments |
| Tool result | What the application sends back after running it |
| Tool choice | Whether the model may decide (auto), must call a tool, or may not call one |
| Parallel calls | Several tool calls in one reply, run together |
| Client tool | Runs in your application, under your permissions |
| Server tool | Runs on the model provider's infrastructure, such as web search |
| Strict mode | Forces calls to match the schema exactly |
Why it matters for a commercial team
Every action an agent takes passes through a function call, which makes it the natural checkpoint. The model proposes; the application disposes. Three design choices follow.
Design tools at the autonomy level you want. If an agent should never send email, do not give it a `send_email` tool. Give it `create_draft`. A tool that does not exist cannot be misused. This is how lowob's rule that nothing sends without a person is enforced in practice.
Validate arguments in code, not in the prompt. If discounts above 10% need finance approval, the function that applies a discount should check the figure and refuse or route it. A prompt instruction can be ignored or overridden; a check in code cannot.
Treat tool output as data. OpenAI's 2023 warning still stands: text returned by a tool, such as an inbound email or a web page, can contain instructions. Our explainers on prompt injection and excessive agency cover the attacks and the controls.
Function calling also explains how MCP fits. The Model Context Protocol standardises how tools are described and served across applications. Function calling is how the model then asks to use them.
Common mistakes
- Vague descriptions. Anthropic's documentation notes the model "determines when to call a tool based on the user's request and the tool's description". "Gets data" is not a description.
- Too many tools. Each definition takes context, and every extra tool is another wrong choice available.
- Tools that do too much. A single `update_crm` tool with free-form fields is harder to check than `set_deal_stage` with fixed values.
- Trusting benchmark scores for long tasks. BFCL's results suggest single calls are largely solved; multi-step sequences with state are not. Test your own sequences.
lowob takeaways
- The model asks; your software acts. Function calling returns a structured request, never an executed action.
- The tool list is a permission list. Leave out actions the agent should not take.
- Put rules in code. Validate arguments where the function runs.
- Tool output can carry instructions. Treat it as untrusted data.
Common questions
What is the difference between function calling and tool use?
They are the same mechanism. OpenAI mostly says function calling; Anthropic mostly says tool use. Both mean the model returns a structured request for your application to run.
Does the AI model execute the function itself?
No, for functions you define. The model only proposes the call; your application decides whether to run it. Some providers also offer server tools, such as web search, that they run on their own infrastructure.
How is function calling related to MCP?
MCP is a standard for describing and serving tools so any compatible application can use them. Function calling is the model-side mechanism that requests those tools.
Is function calling safe for sending emails or updating records?
Only with controls. Expose draft actions rather than send actions, validate arguments in code and require a person's approval for anything client-facing.
Sources and notes
- OpenAI, Function calling and other API updates, 13 June 2023. Vendor announcement.
- Anthropic, Tool use with Claude, accessed November 2026. Vendor documentation.
- Patil et al., The Berkeley Function Calling Leaderboard (BFCL): From Tool Use to Agentic Evaluation of Large Language Models, ICML 2025. Academic benchmark; tasks are general, not commercial.
- The draft-not-send tool design is lowob's working method.