Enforce tool access and approval outside the model
Key takeaway
An action proposed by a model needs validated input, verified authorization and human review when consequences warrant it.
Lessons in this path
How it works
Make an allowlist of operations and targets for each tool. Recheck role and state at execution. Avoid combining read access and external messaging in an unchecked step. Format validity is not business authorization.
Worked example
An agent prepares an internal case reply. Separate approval verifies source, recipient and the exact proposed action.
Why control must sit outside the model
To the agent, a tool is a function with a name, description and parameters it can call, such as “create ticket” or “look up order”. The model proposes the call; an application executes it. That is where the control point lies. Any check that exists only in the model’s instruction is a request, not a rule. The executing application must independently verify at every call whether identity, role, target object, parameters and current case state permit the action.
OWASP describes the risk of excessive agency: too many tools, overly broad tools or too many permissions. The countermeasures are unspectacular and effective: few, narrowly cut tools with minimal permissions.
Step by step: cut a tool safely
These steps apply regardless of whether tools are connected via your own API, an integration protocol such as MCP or an agent platform.
- Instead of generic tools (“run SQL”, “send HTTP request”), define business tools with fixed targets (“get delivery status for order number”).
- Type parameters strictly and check them against allowlists: formats, value ranges, permitted recipients and domains.
- Recheck the permissions of the acting person and the agent at execution, not carried over from session start.
- Classify impact: read, write internally, act externally, irreversible. From “act externally” upwards, require human confirmation showing the exact action.
- Set volume and rate limits, such as maximum affected records per call and calls per hour.
- Reject ambiguous states: if a parameter is missing or the case status is unexpected, the server blocks and reports it instead of guessing.
| Impact class | Example | Minimum control |
|---|---|---|
| Read | Query order status | Role check, logging |
| Write internally | Add note to ticket | Role check, schema, limit |
| Act externally | Send email to customer | Human confirmation of the exact action |
| Irreversible | Payment, deletion, contract change | Four-eyes principle outside the agent |
Going deeper: confirmations that actually protect
Human approval only protects if it is informed. Show the parameters actually to be executed in the confirmation, not the model’s summary: recipient, amount, target object, text. Bind the approval cryptographically or via a case ID to exactly these parameters so nothing can change between approval and execution. And watch for approval fatigue: whoever sees a hundred confirmations a day will eventually click blindly.
Tool descriptions themselves are an attack surface: integrating third-party tool server descriptions unchecked lets foreign text into the context. Maintain a list of approved tool servers with pinned versions and review description changes like code changes.
Test tools by sending deliberately manipulated model outputs directly to the server. If the server accepts them, control sits in the wrong place.
Example: Credit notes in customer service
Example (fictional): a telecommunications group plans an agent that proposes goodwill credits. First draft: a “book credit” tool with a free amount. After review there are two tools: “propose credit” (writes a proposal with an amount up to a fixed cap into the ticket) and an existing booking screen where a person adopts the proposal.
In testing, the team sends a call directly to the server with an amount above the cap and a foreign customer number. Both are rejected and logged. Only then does the agent enter the business trial.
Common mistakes
- Approving generic tools such as free database queries or arbitrary HTTP calls.
- Checking permissions only at session start.
- Confirmation dialogs showing the model’s summary instead of the real parameters.
- Integrating third-party tool servers without versioning and review.
Frequently asked questions
Is a well-instructed model enough?
No. Instructions improve behaviour but do not replace server-side checks. Every rule that must hold belongs in the executing code.
When is human approval required?
As orientation, for external effects, irreversible actions and actions above defined thresholds. The exact line is set by the business together with information security.
How do we prevent approval fatigue?
Only present genuinely consequential actions for confirmation and secure routine actions through rules and limits. Monitor approval rate and review time: if the rate stays close to one hundred percent with very short review times, probably nobody is really checking any more.
Try it yourself
Define permitted roles, operations and targets. Use neutral test fixtures to ensure the server denies ambiguous actions.
Check your result
Convincing model outputs cannot cause unapproved actions.