Back to Glossary
What Is AI Agent Tool Calling?
Tool calling is how an AI agent acts: the model asks for a named tool with structured arguments, and the application runs it and returns the result.
By Hagai Cohen and Maksim Markov
November 28, 2026
6 min read
Definition
AI agent tool calling is the mechanism by which a language model takes actions: the model chooses a tool from a list it has been given and returns a structured request with the arguments, and the application executes that request and passes the result back to the model. Tools can be API calls, database queries, code, messages to people or other agents. The model decides what to call; the application decides whether the call runs and with what permissions.
Why it matters
Tool calling is what turns a chatbot into an agent that finishes work in your systems. It is also where the risk is. A model that writes a wrong sentence produces a bad answer. A model that calls the wrong tool issues a refund outside policy, posts an invoice that doesn't match its PO, or updates a vendor record with changed bank details.
So the questions that matter in operations are about the tools, not the prompt: which tools does this agent have, which of them change data, whose credentials do they run with, and who has to sign off before the irreversible ones run.
How it works
The basic loop is the same across model providers:
- Describe the tools. The application sends the model each tool's name, a description of when to use it, and a JSON Schema for its arguments.
- The model requests a call. Instead of a text answer, the model returns a tool name and arguments, for example
issue_refundwith{"order_id": "4471", "amount": 320.00, "currency": "USD"}. - The application validates and runs it. It checks the arguments against the schema, applies permissions and approvals, resolves credentials, and calls the real system.
- The result goes back. The tool's output is added to the conversation, and the model decides what to do next: call another tool, ask a person, or answer.
Good tool definitions do a lot of the work. Clear names and descriptions reduce wrong choices. Strict schemas with enums and required fields catch malformed arguments before they reach a real system. Narrow tools (get_order, issue_refund) are safer than a generic call_api that can do anything.
Not every tool carries the same risk, and it helps to classify them:
| Action type | Examples | Typical control |
|---|---|---|
| Read-only | Look up an order, search a knowledge base | Allowed freely |
| Reversible | Draft an email, add a note, tag a ticket | Allowed, logged |
| Irreversible | Issue a refund, send to a customer, pay a supplier, delete a record | Requires a person's approval |
Credentials are the other half. An agent acting for the whole company can use a scoped service account. An agent acting for a specific person should use that person's own connection, so it can only see and do what they can.
Common mistakes
- Too many tools. Every extra tool is another wrong choice the model can make, and another path for prompt injection to exploit.
- Approval inside the prompt. Telling the model to "ask before refunding" is a suggestion. Approval has to be enforced by the platform, before the tool executes.
- Secrets in context. API keys pasted into prompts or returned in tool output can leak into logs and replies.
- One shared super-user. Running every tool as an admin account means the agent can do far more than the person it is helping.
- Trusting tool output. Text that comes back from a tool, such as an email body or a web page, is data. It can contain instructions aimed at the model.
How Fruxon does it
Every Fruxon tool declares an action type: read-only, reversible or irreversible. Automations and their stages can cap a run at read-only or reversible tools, and those limits also withhold any tool that never declared what it does. Approval gates can be put on any tool. They run before the tool executes, outside the model, the approver sees the exact arguments, and every decision is recorded in an audit log. Approvers are a slot bound to a person, role or queue. One caveat: on draft and test runs the gate approves automatically, so a test run won't show it stopping anything.
Integrations can connect at the Application level, per user, or per user with an Application fallback. When a user-level connection is missing, Fruxon sends that person a link to connect just in time. Secrets are granted per agent, resolved when the tool runs, never sent to the model, and scrubbed from tool output. Tool results, model output and outgoing replies are scanned for national ID numbers, payment cards, bank account numbers and secrets, and every detection is recorded per workspace. Every tool call appears in the run's trace with its parameters and result.
Frequently asked questions
What is tool calling in AI?
Tool calling, also called function calling, lets a language model request an action instead of only writing text. The application describes the available tools to the model, the model replies with the name of a tool and the arguments to pass, and the application runs it and sends back the result. The model never executes anything itself.
What is the difference between tool calling and function calling?
They mean the same thing. Function calling was the earlier name used by some model providers. Tool calling is the more common term now, and covers APIs, database queries, code and other agents as well as plain functions.
How do you stop an AI agent from calling the wrong tool?
Give it only the tools the job needs, with clear names, descriptions and strict argument schemas. Separate read-only tools from ones that change data, and require a person's approval before the irreversible ones run. Approval should be enforced by the platform, outside the model, so a confused or manipulated model cannot skip it.
Whose credentials should an agent use when it calls a tool?
For shared systems, a service account scoped to what the agent needs. When the agent acts for a specific person, such as reading their inbox or filing a ticket in their name, it should use that person's own connection so it can do only what they can do. Credentials should be resolved when the tool runs and never placed in the model's context.
Related
Back to Glossary
