Skip to content

What is tool calling (function calling)?

Tool calling lets a language model propose an external function call and its arguments; the application runs it or, for built-in tools, the model provider does.

Tool calling is the mechanism by which a language model proposes using an external tool, specifying the operation and the information needed to perform it. For example, when asked about an order's status, the model can request a lookup in a business system instead of inventing an answer. The request does not perform the operation by itself: for tools a company defines, the application hosting the model receives the proposal, decides whether it is permitted, calls the tool, and can return the result to the model. The model can then answer or propose the next step. Each available tool is described by a name, a purpose, and a schema listing the inputs it accepts. A request that fits the schema can still target the wrong record or ask for an unauthorized operation. Control therefore belongs to the application and its connected systems, which must check identity, permissions, and conditions before reading data or taking action. The mechanism is also called function calling.

See also: AI Agents (Agentic AI)An AI agent is a system that uses a model and external tools to select and perform actions toward a goal, within established boundaries and permissions.

How it works

The application presents the available tools to the model and receives any proposed call. Under the MCP specification, for example, the tool definition includes its name, description, and input schema; the request the client sends to the server contains the tool name and its arguments. The result can also report an error, and the orchestration layer must handle it without presenting a request as a successful action. Some providers also offer built-in tools, such as web search, that run on their own infrastructure, so the application receives the result without executing the call.

Tool calling selects an operation, while structured outputs concern the shape of a response. If an application only needs data in a prescribed format, a response schema may suffice; looking up up-to-date order data also requires a connection to the system holding it. MCP is one way to expose tools, not a requirement for tool calling.

An enterprise example

A purchasing assistant receives a question about an order's status. It proposes a lookup using the supplied number; the application checks whether the user may see that order and uses a read-only function. If the number is missing, the assistant asks for clarification. If the system does not respond, the assistant reports the problem rather than claiming the order was found. A request to modify the order goes through a separate tool, with appropriate permissions and human approval before anything changes.

Why it matters for decision makers

Procurement should ask how reading and writing are separated, where permissions are enforced, and which actions require confirmation. OWASP recommends limiting tools and permissions to what is necessary, enforcing checks in downstream systems, and requiring approval for high-impact actions. Evaluation should also include incomplete requests and questions no provided tool can answer: the When2Call study tests when models should call, ask for clarification, or admit that the available tools fall short, and finds significant room for improvement in the state-of-the-art models examined. The decision to call and the actual outcome therefore need evaluation, along with the choice of tool and arguments.

Frequently asked questions

No. The model proposes a call; for functions a company defines, the application decides whether to execute it and handles the result, while built-in tools run on the provider's own infrastructure.

No. MCP is a protocol for exposing tools, but applications can also connect functions to a model in other ways.

No. Even with well-formed arguments, the call still needs authorization checks and, for high-impact actions, human approval.
  • AI Agents (Agentic AI)An AI agent is a system that uses a model and external tools to select and perform actions toward a goal, within established boundaries and permissions.
  • Agent harnessAn agent harness is the software scaffolding around an LLM that makes it an agent: the execution loop, the tools, the context and the limits you give it.
  • MCP (Model Context Protocol)MCP is an open protocol connecting AI applications to external data and tools, with standard messages to discover and use the capabilities a server exposes.
  • Structured outputsStructured outputs constrain a language model's response to a declared schema but do not guarantee that the values the model generates are accurate or truthful.

See it in the universe

If you need the AI in production, not in a demo, that is my job.

See AI integrations

Or write to me.