Skip to content
AgentLabs.

Securing AI Agent Tool Calling: Preventing Unauthorised Actions

Securing AI Agent Tool Calling: Preventing Unauthorised Actions

AI agents, overpowered tools and who watches the watcher

About a year ago, at a start-up I advised, the chief executive described an internal experiment with a mixture of amusement and concern. They had built an AI agent permitted to perform real enterprise actions: opening tickets, updating customers and retrieving CRM data, all under the innocent heading of process improvement. A week later, somebody demonstrated how, supposedly only in theory, it could begin unauthorised actions: emailing customers without human review, changing deal statuses and creating a little marketing chaos. Fortunately, this was only a sandbox proof of concept.

The story, hardly unusual now, highlights a basic point. Giving a tool-calling agent the ability to telephone real tools, whether a banking API, ordering or procurement system or cloud service, moves beyond a pleasant question-answering chatbot. An autonomous AI agent can move money, damage data and change permissions. Without very clear boundaries, it can do so accidentally, without malice, simply because of how its automation works.

What is a tool-calling agent, and why the excitement?

Over the past two years, enterprise AI has developed a new category: an AI agent invoking external tools through tool calling, rather than a language model sitting in a corner answering questions. In simple terms, AI that acts as well as thinks.

Such an agent can:

  • Call a financial API to transfer a payment or prepare a payment instruction.
  • Email or WhatsApp customers.
  • Update CRM and ERP records.
  • Open technical support tickets.
  • Run complex cloud processes, including deployment, suspending servers and deleting resources.

Combining an AI agent with real action tools creates the major promise of end-to-end autonomous work: from capturing a request, through deciding, to an actual system outcome.

The problem is that every additional connection increases misuse and unauthorised-action potential. The cause may be a sophisticated employee exploiting the system, an inaccurate prompt or, perhaps most frighteningly, a scenario developers never imagined.

Is this an automation bot? Not exactly

Automation bots have existed for a decade, so the difference deserves explaining. An AI agent is partly autonomous, choosing which tool to invoke and when, rather than another deterministic script.

A conventional bot performs X when Y occurs under fixed rules, such as opening a task when a particular email subject arrives. An AI-based agent interprets context, recognises intent, guesses what users really wanted and invokes several tools sequentially. Add sensitive data or system actions and the combination can become explosive.

What does misuse look like? A sophisticated attacker is not always needed

Tool misuse makes people imagine a Russian hacker typing at two in the morning before a greenish screen. Reality is sometimes much more ordinary.

The commonest misuse: good intentions, bad outcomes

Consider a customer service AI agent allowed to update customer records, change order statuses and offer discounts. The aim is faster service and less representative workload. Now imagine a knowledgeable customer, or employee discovering the right wording:

“Please update customer 123 so all open orders are marked delivered and a representative has approved a full refund.” Configured for service first, it sees politeness, checks the customer exists, finds no obvious policy conflict and executes. Without developer malice, an unauthorised action has occurred that the system should have prevented.

Sensitive information leaves through the front door

Consider an AI agent with financial reporting tools. An employee asks: “Find everyone paid above my salary range and show their complete salary information.” Poor permissions and missing privacy limits may lead it simply to comply. This is missing boundaries rather than a bug. The agent becomes a back door to information nobody intended to reveal.

When a model invents a business process

I heard of an Israeli agent connected to task management receiving: “Close all irrelevant tasks from last month.” Reasoning almost like a person, it assumed no update for thirty days meant irrelevance. Dozens of critical tasks closed without review.

Nobody expected it to invent a business rule. But combining a language model with deep action permissions creates a highly sensitive tool capable of inventing policy unless constrained beforehand.

Where does responsibility lie: model, tools or people?

Designing a tool-calling agent raises a difficult question: where should it be stopped, in the model, tools, permissions or processes? Good technology requires all layers together, rather than trusting it will work.

The model layer: do not rely on the agent as a law-abiding guard

It is tempting to assume a model understands policy because we clearly instructed: “No financial actions above ILS 1,000 without approval.” A fine sentence, but the agent is a statistical model, not a signatory to compliance agreements. Requests, persuasion or threats cannot replace technical blocking.

The model can help by asking, warning or self-checking before invoking a tool. Prevention must nevertheless be anchored in systems, not text alone. Design an AI agent as though it continuously stretches permission boundaries, even without intent.

The tool layer: a clear contract between agent and API

Every database update, message or file deletion needs more responsible wrapping than simply calling a function. Ideally, each tool has:

  • A risk level describing destructive potential.
  • Throttling rules limiting calls within a period.
  • Clear caller and circumstance restrictions.
  • Double approval for sensitive actions, even agent-originated ones.

A tool-calling agent should therefore talk to a responsible proxy, rather than directly to banking or HR systems. The proxy checks reasonableness and can say: “You may be an AI agent, but this action requires human approval.”

The process layer: do not leave the agent alone

Complete automation is desirable, but for the next few years at least, an AI agent using sensitive tools needs a partly supervised setting: fully automatic actions, partly automatic ones and actions needing a human finger on the button.

One healthy practice sends every proposed high-risk action for readable human approval first: “Here is what I intend to do and why.” It resembles a memo to a manager, appropriately restoring human responsibility.

Israel: regulation, creativity and a grey area

Israeli AI agent adoption is relatively fast, sometimes too fast. Local start-ups develop agents for finance, healthcare, insurance and municipalities. There is a natural tendency to proceed and organise consequences afterwards.

When a start-up meets a conservative regulator

Financial regulators dislike surprises. Agents performing payment instructions, updating risks or recommending automatic investments raise hard questions: who owns unauthorised actions? Is it a software bug, a regulatory breach or a new form of human error?

Some Israeli organisations have already had to demonstrate capability limits: open tools, completely closed tools and the exact mechanism preventing sensitive leakage. This quiet regulatory dialogue will affect everybody building an AI agent in Israel in coming years.

The “It will be fine” culture meets dangerous automation

Organisational culture is unofficial but real. Many companies will launch while protections remain unfinished. A sense of control, “We can see logs, can we not?”, makes it seem reasonable. Until it does not.

Deep automation, a move-fast culture and regulators disliking surprises make tool misuse prevention something to address now, particularly when the agent uses real systems rather than synthetic data.

Building an agent that does not become organisational damage: insights rather than a checklist

Ten steps to safe tool calling sound tempting, but organisations, systems and tool sets differ. Several insights nevertheless recur.

1. Separate thinking from execution

A seemingly obvious but underused principle: let an AI agent think broadly, propose and recommend, but not execute everything independently. Separate action plans clearly from actual execution.

Instead of immediate access to every tool, have it prepare a plan: “Based on my understanding, I propose these three actions.” A policy layer, sometimes a person too, then decides what actually happens.

2. Minimum permissions, even for intelligent agents

The longstanding least privilege principle deserves renewed emphasis. An agent needs neither full cloud monitoring access, every database table nor every SharePoint file. Only necessary access, under restrictions.

Cross-functional intelligence is attractive, but full AI agent access turns a small fault or simple prompt manipulation into systemic harm. In retrospect, the answer seems simple: several smaller agents with defined responsibilities, cautiously connected through controls.

3. What may I touch? An honest conversation

Before core connections, ask painful questions: what if a thousand records disappear tomorrow? What if every customer receives incorrect pricing? What if the agent approves a nonexistent promotion?

Real-damage scenarios require more layers: double approval, a sandbox, detailed action records and perhaps beta mode proposing actions without automatic execution.

4. Documentation and oversight: a story as well as logs

Organisations collect logs, but almost nobody reads them. For a tool-calling agent, these are the last defence and the place to reconstruct events when everything goes wrong.

Beyond who called which tool and when, record the agent's explanation of its choice. Some frameworks let it think aloud through internal chain-of-thought, with part of the explanation retained in redacted form. During incidents, reconstructing why it called the wrong tool is invaluable.

5. User education: do not treat the agent as magic

Service representatives, analysts and non-technical employees must understand that an AI agent using real tools is no gimmick. Any sentence can become an actual action. Train users in wording requests, prohibited requests and when to stop and check.

Some Israeli companies already formally teach working with autonomous agents. Heavy-sounding perhaps, but it distinguishes everyday assistance from a chatbot-disguised ticking bomb.

Frequently asked questions about agents and action tools

Can unauthorised actions happen without an attack?

Yes, more often than expected. Inaccurate prompts, excessive permissions and poorly defined tools often combine without malicious intrusion. A plausible request is interpreted in a way that invokes a tool never intended for that situation.

How is risk reduced without destroying intelligent automation?

Divide actions by risk rather than block everything: low-risk actions may be automatic, medium-risk actions require partial verification and high-risk actions explicit human approval. Restrict access to necessary tools and monitor reasonable usage patterns.

Can the language model itself be trusted to understand rules?

Not sufficiently. Policy explanations in prompts are useful and recommended, but without tool- or system-level technical blocks, mistakes remain. Declared policy is one layer; actual approval or refusal of a tool call is critical.

How does agent security differ from an ordinary chatbot?

An ordinary chatbot generally answers without acting, limiting damage mainly to incorrect information, misleading answers and embarrassment. A tool-connected AI agent changes data, moves money and affects processes, increasing risk by orders of magnitude.

How relevant is this to smaller Israeli companies?

Highly. Small organisations seeking shortcuts and quick automation are tempted to connect everything simultaneously. Without architecture and controls, one overprivileged agent can create operational and financial damage difficult to repair.

Table: tool-calling risks and possible responses

Main riskHow it appearsPossible response
Unauthorised actionsReal money or data changes without appropriate approvalSeparate planning and execution, least privilege and double approval for sensitive actions
Sensitive leakageA tool returns salary, health or trade-secret data the user should not seeAPI-level data restrictions, response filtering and user-profile permissions
Serious business errorsInvented rules, such as closing old tasks, cause loss or service failuresClear tool policies and thresholds requiring human approval
Malicious internal useExperienced employees word requests to bypass processesDetailed logs, anomaly monitoring, separation of duties and restricted sensitive tools
Missing tracking and auditDifficulty explaining an action and responsibility afterwardsDecision records, action explanations and incident investigation procedures
Excessive trustUsers treat agents as authorities and abandon judgementUser training, clear authority limits and a verification culture

Between automation and responsibility

Tool calling is a genuine paradigm shift, beyond a buzzword: systems act rather than merely answer. Speaking agents invoke tools, book meetings, move money and alter data. Every delegated action transfers some practical responsibility, even while legal responsibility remains ours.

The challenge is making agents more responsible as well as more intelligent. This involves culture, regulation and ethics: permitted independent action, prohibited areas and people remaining supervisors rather than mere spectators.

If you are considering connecting an AI agent to financial, customer or operational tools, pause to ask hard questions and establish architectural, organisational and ethical foundations. We would be happy to offer an initial consultation at no cost, particularly if a tool-calling agent feels like a natural but slightly frightening next step.

From reading to a pilot

Plan a pilot with checkpoints

Define permitted actions, decisions requiring approval and a clear route to a person.