Skip to content
Back to the AI glossary
Workflows

Tool/function calling

AI can call external tools and APIs to complete tasks.

Explanation

Function calling enables LLMs to not only generate text, but to trigger structured actions - e.g. query a database, send an email or perform a calculation.

How it works

The model receives a list of available functions with descriptions. Based on the user request, it decides which function should be called with which parameters.

Example

An AI assistant that responds to the question "What is the status of my order?" automatically calls the order API and returns the response.

Why it matters

Function calling turns LLMs from pure text generators into actionable systems that can intervene in real business processes.

What is tool calling?

Tool calling, also called function calling or tool use, is the ability of a language model to respond with a structured call to a function instead of plain text. The application describes the available tools to the model with name, purpose and parameters, usually as a JSON schema. When the model decides a tool would help, it returns something like “get_order_status” with the order number as a parameter.

Crucially, the model does not execute anything itself. The application validates the call, runs it and passes the result back to the model, which then writes the answer or plans the next call. This loop is the foundation of every AI agent.

Tool calling vs. MCP

Tool calling is the model capability. The Model Context Protocol (MCP) is an open standard for how tools and data sources are exposed to models. Without MCP, every application defines its own tools and integrates each system individually. With MCP, an MCP server exposes its tools once, and any compatible client can discover and use them at runtime.

MCP does not replace tool calling, it builds on it. For a single, well-scoped integration, plain tool calling is enough. When many systems need to be connected to several AI applications, MCP saves a lot of integration work.

Frequently asked questions

What is the difference between tool calling and function calling?

There is no real difference. OpenAI introduced the capability in 2023 under the name function calling, and tool calling or tool use is the more common term for the same thing today.

Which models support tool calling?

All major commercial models, including GPT, Claude and Gemini, as well as many open-weight models. Reliability with many tools and complex parameters still varies noticeably between models.

Is tool calling safe?

It is as safe as the tools you expose. Proven practices are least-privilege access, separate read and write tools, validating every parameter in your application and human approval for actions that cannot be undone.

Ready to make AI actually work?

Book your free 30-minute consultation — no strings attached, fully confidential.

Book a free consultation