Tool Calling
Last Updated: September 10, 2026 | By Mihail Sebastian | AI Dictionary
The mechanism that lets a language model invoke functions and APIs: the model returns a structured call, the runtime executes it. Agents are built on it.
What is Tool Calling?
Tool calling, also called function calling, is the mechanism that lets a large language model invoke functions and APIs instead of only producing text. It is the primitive underneath every AI agent: a model that can call tools can look things up, change records, and act in the world.
The model itself executes nothing. It asks; the surrounding software decides and acts.
How Tool Calling Works
The developer describes each tool to the model with a typed schema: a name, a plain-language description, and the parameters it accepts. The schema is the contract; a good description is what lets the model pick the right tool at the right moment.
When the model decides a tool would help, it does not run code. It returns a structured call, typically JSON naming the tool and its arguments, such as get_order_status(order_id: "8841"). The application’s runtime validates that call, executes the real function, and feeds the result back into the model’s context, where the loop continues until the model answers in plain text.
Chaining these calls is what makes agentic AI work, and every call plus result must fit in the context window. The Model Context Protocol (MCP) is an open standard for this plumbing: it gives tools a common way to describe themselves to any model instead of each vendor wiring integrations separately.
Example of Tool Calling
A customer asks a support agent, “Where is my order, and can I get a refund if it’s late?” The model has two tools: order lookup and refund issuance.
It first returns a call to get_order_status with the order ID from the conversation. The runtime queries the order system and returns the result: shipped, three days behind schedule. Reading that, the model returns a second call, issue_refund, which the runtime is configured to hold for human approval because it moves money.
An agent approves, the refund executes, and the model writes the customer a reply with both facts. Two tools, two different trust levels, one conversation.
FAQ
Why do refund-style tools need approval steps?
Because the model’s call is a prediction, not a verified decision, and a prompt injection in the conversation could trigger it. Gating consequential tools behind confirmation keeps a text-level attack from becoming a financial one, and logged calls give agent observability tooling a trail to audit.
Is tool calling the same as a plugin or integration?
The integration is the tool; tool calling is the mechanism the model uses to reach it. Any API becomes a tool once it is described to the model with a schema and wired into the runtime.
Related AI terms: AI Agent · Agentic AI · MCP · Prompt Injection · Excessive Agency
Did you like the Tool Calling gist?
Learn about 250+ need-to-know artificial intelligence terms in the AI Dictionary.
