Key takeaways
Tool calling enables AI agents to retrieve live information and request actions in business applications.
A structured tool request is a proposed action, not evidence that an operation has succeeded or been authorised.
Define narrow business functions and enforce identity, permissions and policy outside the language model.
Protect operations that change records with approval gates, duplicate protection and reconciliation.
Measure verified business outcomes, not the number of successful API requests.
Choose conventional workflows when the process is predictable and does not need flexible interpretation.
When an AI assistant needs to do more than talk
A customer contacts an online retailer: their parcel has not arrived, and they want to know whether a replacement can be arranged. A conventional chatbot might explain the delivery policy. A more capable assistant could check the order, retrieve the latest carrier update, assess the applicable replacement rules and prepare a request for the customer service team to approve.
The difference is not simply a more intelligent language model. The assistant needs a reliable way to interact with business systems. It needs to know what it can access, which operations it is allowed to request and when someone must intervene.
AI agent tool calling provides this connection. It turns a conversation into a potential business workflow, without requiring the language model itself to contain current order information or have unrestricted access to company applications.
For business leaders, the opportunity is to reduce unnecessary switching between systems and help employees complete routine work. For technology and risk teams, the challenge is ensuring that an apparently helpful assistant cannot perform the wrong operation, access another customer’s records or report a result that never occurred.
What tool calling actually means
A tool is a capability made available to an AI system through a defined interface. It might retrieve a record, search a document collection, calculate a figure, check a policy or submit a request to another application.
Function calling is a common form of tool calling in which a language model returns a structured request containing a function name and its arguments. For an application-defined function, the surrounding software interprets that request, decides whether execution is permitted, runs the operation and returns its outcome to the model. Provider-hosted tools may instead run within the provider’s infrastructure.[1][2]
Imagine a tool named get_order_status that accepts an order identifier. The model might propose the arguments {"order_id": "ORD-1042"}. This is a request to look up the order, not a database query or a confirmed delivery status. The application must establish that the authenticated user is entitled to see the specified order.
Retrieval-augmented generation (RAG) can help an assistant consult relevant documents before answering. Tool calling can include retrieval as one of several capabilities, alongside calculations and authorised transactions. The two approaches are complementary rather than competing.
Follow one request through the entire workflow
Consider the undelivered parcel. The assistant first needs to establish which order the customer means. If several orders match the conversation, it asks for clarification rather than guessing.
The application supplies the model with relevant tool definitions. The model requests an order lookup, and the execution service validates the arguments and confirms ownership before contacting the order management system. It returns only the details needed for the task.
Once the order is identified, a carrier-status tool retrieves current tracking information. The assistant can then request a replacement-eligibility check, which applies authoritative business rules to the order and delivery evidence. Where the rules are inconclusive, the case goes to a human instead of being resolved through speculation.
If a replacement is permitted but requires approval, the system prepares a request with the exact order, item, proposed action and reason. The approving employee sees those details before authorising submission. If the request is rejected or expires, the operation remains blocked.
After execution, the application checks the authoritative transaction outcome. A generated message saying that a replacement has been arranged is not evidence of completion. A verified reference from the fulfilment system provides a much stronger basis for the customer-facing response.
Design tools around business operations, not entire systems
Giving an agent access to a broad database query function or an unrestricted application programming interface (API) can appear convenient during development. It makes the production system much harder to govern. Prefer purpose-specific tools that expose just the operations needed for a defined business task.
A well-designed tool contract specifies its name, purpose, input schema, required fields, valid values and expected result. Its technical design should also describe which roles can invoke it, whether it changes records, what preconditions apply, how errors are returned and whether a call may be retried.
For example, get_order_status is a read operation; check_replacement_eligibility evaluates business rules; create_replacement_request changes workflow state. These separate functions allow the execution layer to enforce different permissions and approval requirements. Avoid creating multiple tools with overlapping descriptions that make their intended use ambiguous.
Some model APIs support strict schema enforcement for function arguments.[1][2] This is useful for ensuring that inputs have the expected structure. It does not establish that the selected order belongs to the customer, that a proposed amount is correct or that the operation is permitted. Those are business and security checks.
Return structured outcomes such as success, not_found, permission_denied, approval_required or temporarily_unavailable. Distinguish verified system results from explanatory text. A precise tool result gives the assistant a better basis for choosing its next step and prevents unnecessary disclosure of internal errors.
The model proposes; the execution service authorises
The most important architectural distinction is between deciding what to request and deciding what may actually happen. The language model can interpret natural language and propose a suitable action. An independently enforced policy layer must determine whether that action is permitted.
Establish the user’s identity from trusted session information, not from an identity or account number asserted by the model. Enforce access to individual records and organisations at the service boundary. Use scoped credentials, store secrets outside model context and pass only the necessary data to tools.
Tool permissions should depend on both the person initiating the request and the operation being performed. A service account with broad privileges must not allow an agent to bypass restrictions that would apply to a human employee.
For consequential actions, bind an approval to the precise operation, affected records, relevant parameters, approver and expiry. Revalidate authorisation and current business state immediately before execution. A change in amount, recipient or another material parameter should require fresh approval.
OWASP identifies excessive agency and prompt injection as important security risks for systems connected to tools.[3][4] A retrieved document, email or API response may contain text that attempts to redirect the agent. Treat such content as untrusted data, not an authority to expand the task or disclose information. Prompt instructions are useful, but cannot replace downstream access controls.
A tool call can succeed while the business task fails
An API may return a successful response when it accepts a replacement request for processing. That does not mean a replacement has shipped. The business workflow must distinguish between requested, approved, submitted, pending and completed states.
Network failures introduce another problem. Suppose the application submits a replacement and the response times out. A second submission could create a duplicate even though the first one succeeded. A retry policy needs to know whether a tool changes external state and whether repeating the call is safe.
Use a durable business-operation identifier and an idempotency key where supported. Idempotency means repeated requests representing the same intended operation do not create additional effects. The service should detect conflicting reuse of a key and retain duplicate-protection records for the relevant retry period.[5]
When the result of a non-idempotent operation is unknown, reconcile its status with the system of record before considering another attempt. For workflows spanning several systems, record intermediate states and provide a controlled reconciliation or compensating process for partial failures.
Set a maximum number of tool invocations, execution deadline and spending budget for each task. Stop on repeated failures or lack of meaningful progress. Parallel calls can improve responsiveness for independent lookups, but dependent actions must follow the appropriate sequence and recheck state before modifying it.
Where agents can create value across the organisation
Customer service: a tool-enabled assistant can gather order, payment and delivery information from authorised systems and prepare an appropriate resolution. The potential benefit is less manual searching; the key dependency is trustworthy, current system data.
Finance operations: an agent could retrieve invoice and purchase-order details, call a matching service and prepare exceptions for review. It should not treat a plausible explanation as proof of reconciliation or bypass payment approval.
IT support: an assistant might retrieve diagnostic information and open a support ticket. Changes to production infrastructure require separately controlled permissions and appropriate review; they should not be enabled merely because the assistant can diagnose the issue.
Procurement: an agent could compare approved supplier information and prepare a purchase requisition. Authority to commit expenditure remains with the established procurement process.
In each situation, the business case depends on the cost of the current manual process, the reliability of the underlying tools and the proportion of cases that can be handled without creating additional review work. Connecting more systems does not automatically improve productivity.
When a conventional workflow is the better choice
If the steps of a process are known in advance, a rules engine or conventional application may be easier to test, cheaper to operate and more predictable. A daily inventory reconciliation, for example, usually needs defined data transformations and exception rules rather than a language model deciding which calculation to run.
Agentic AI is more compelling where the entry point varies: a customer describes a problem in different ways, an employee asks a question requiring several lookups, or a support case needs different investigation paths depending on the available evidence.
A hybrid architecture can offer the best fit. Use the model to understand ambiguous requests and choose among approved capabilities, while deterministic software handles transaction rules, calculations, access control and state transitions. Reserve people’s judgement for unresolved exceptions and consequential approvals.
The question is not whether an entire process can become autonomous. It is which parts genuinely benefit from flexible interpretation and which parts should remain predictable.
How to know whether your agent is worth deploying
Begin with one narrow workflow, such as an authenticated order-status query. Establish a baseline for handling time, resolution quality and cost. Introduce read-only tools first, and expand to state-changing operations only after the relevant controls have been tested.
Build an evaluation set from representative authorised test cases. Include ambiguous requests, missing identifiers, inaccessible records, stale data, contradictory tool results, timeouts, malicious instructions in retrieved content and repeated calls. Test whether the agent correctly decides not to invoke a tool when none is needed.
Track tool selection accuracy, argument validity, unauthorised execution attempts, approval adherence and duplicate side effects. Measure verified task completion against all attempted tasks, including failures and escalations, and measure the correctness of final responses against authoritative records.
For business economics, divide total delivery costs by the number of tasks completed to the required standard. Include model inference, tool charges, infrastructure, failed attempts and human review. Compare turnaround time, tail latency and exception rates with the existing process. A high number of successful API calls is not, by itself, a sign of business value.
Maintain a protected audit trail linking the request, user, tool version, relevant parameters, policy decisions, approvals and verified result. Restrict sensitive log content and assign clear ownership for incident response, tool changes and operational monitoring.
If your organisation is considering AI agents, start by mapping the business operations it wants them to perform and the decisions that should remain under human control. The most valuable agent is not the one with the greatest number of tools. It is the one that can reliably complete the right task within the right boundaries.
References and further reading
[1] OpenAI. Function calling. Official developer documentation: https://developers.openai.com/api/docs/guides/function-calling
[2] Anthropic. Tool use with Claude. Official developer documentation: https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview
[3] OWASP Gen AI Security Project. LLM03:2026 Excessive Agency. Source: https://genai.owasp.org/llm2026/llm032026-excessive-agency/
[4] OWASP Gen AI Security Project. LLM01:2026 Prompt Injection. Source: https://genai.owasp.org/llm2026/llm012026-prompt-injection/
[5] Amazon Web Services. AWS Well-Architected Framework, REL04-BP04: Make mutating operations idempotent. Source: https://docs.aws.amazon.com/wellarchitected/latest/framework/rel04-bp04.html
Apply the approach
Consider an online retailer investigating a missing parcel. Its agent can inspect the authenticated customer’s order, check the carrier’s latest update and evaluate replacement eligibility. The business rules determine whether a replacement request is allowed; a separate approval and execution service governs any state-changing action.
Retrieve only authorised records and current delivery information without changing the customer’s order.
Apply the retailer’s configured policy and return a structured eligibility decision or an exception.
Submit the approved request with duplicate protection, then verify the resulting state in the fulfilment system.
Put the approach into practice
- 01Select a business process with a measurable problem, reliable source systems and a named owner.
- 02Define narrow tool contracts, trusted user identity, record-level access and clear execution permissions.
- 03Separate read operations from state-changing operations and implement appropriate approval and retry controls.
- 04Test correct tool selection, invalid inputs, prompt injection, failures, duplicate requests and business outcomes before rollout.
- 05Compare verified task completion, service quality, total cost and human intervention against the original workflow before expanding autonomy.
Frequently asked questions
Is AI agent tool calling the same as function calling?
The terms often overlap. Function calling usually refers to structured requests for developer-defined functions. Tool calling is broader and can also refer to capabilities hosted by a model provider or exposed through other integration mechanisms.
Can AI agents call existing enterprise APIs?
Yes, when a suitable integration exposes approved operations and authenticates the caller. An organisation does not necessarily need to replace its existing systems, but it should define stable interfaces, permission checks, error handling and monitoring.
Do AI agents need Model Context Protocol to use tools?
No. Applications can define functions directly and invoke them through their own integration layer. Model Context Protocol (MCP) is another way to connect AI applications with tools and contextual resources. It does not remove the need for authorisation, security review or business validation.
Can a valid tool call still be unsafe?
Yes. A request can conform to the expected schema and still access the wrong record, request an unauthorised transaction or repeat an earlier action. Validate business context and permissions separately from argument structure.
What happens if the agent selects the wrong tool?
The execution layer should reject disallowed calls, invalid arguments and unmet business preconditions. A permitted but unsuitable read operation may still waste time or produce a poor answer. Evaluate tool selection, constrain the available tools and escalate when the correct action is uncertain.
How much does AI agent tool calling cost?
Costs depend on model inference, the number and duration of tool calls, external API pricing, integrations, monitoring, failed attempts and human review. Compare the total cost of completing a verified task with the existing manual or automated process.