AirborneOps Learning Labs · working with AI
Safe Tool Calling
A model can ask an application to use a tool, but that request is only a proposal. Learn what the application must check before it allows a tool to act on an IT system.
Learning outcome
Given a proposed IT tool call, identify the requested action, explain how the application checks permission and input validity, and describe when a separate authorized person must confirm before execution.
This beginner reading is supplemental and outside the eight-lesson AI Beginners sequence. It requires no account, subscription, or lab attempt.
Keep the roles separate
A proposal is not permission or execution
A tool call is structured output from the model: it names a tool and suggests arguments. The application receives that output as untrusted input. It makes its own authorization and validation decisions, then decides whether any operation may run.
1. Proposal — the model asks
The model might propose a tool name and values, such as “restart the training VPN because users report slow connections.” That output describes what the model wants the application to consider. It does not prove that the caller is allowed to do it, that the values are safe, or that anything has happened.
2. Authorization and validation — the application checks
Application code checks the real user’s identity and permissions, whether the tool is available for this workflow, and whether every argument matches the expected input rules. The model cannot supply its own role or override those checks with confident wording.
3. Execution — the application acts only after approval
A read-only lookup may run after its checks pass. For a consequential change, the application can hold the validated request for a separate confirmation by an authorized person. Only the application can carry out the approved action; a model response cannot approve its own proposal.
Fictional IT example
A restart request for a training VPN
Made-up scenario: “Northstar Training” and its VPN are fictional. They do not describe a real company, network, account, or operating procedure.
A help desk analyst, Maya, asks an assistant to fix slow connections. The model proposes the following tool call:
restartTrainingVpn({
serviceId: "training-vpn",
reason: "Users report slow connections"
})Least privilege: keep the tool narrow
The application exposes one maintenance function that can request a restart of the dedicated training VPN only. It accepts a known service ID and a reason. It cannot target an arbitrary host, run a shell command, change user accounts, or restart the production VPN. A separate read-only status tool would not receive restart permission.
Controls outside the model
Check the caller and the arguments
The application checks the person’s session and role on the server; it never trusts a user name or role field supplied by the model. It also validates the tool name and arguments against a strict schema before creating any request.
Permission check
Maya can read the training VPN’s status but does not have permission to request a restart. The application rejects her model’s proposed call before any operation or approval request is created.
Input validation
If the model instead proposes
serviceId: "production-vpn", the application rejects it because that value is outside the tool’s allowed scope. A malformed tool name, missing reason, or reason over the application’s length limit is also rejected. Validation is performed by application code, not by asking the model whether its inputs look safe.
Rejected means no side effect
An unauthorized caller or invalid target receives a safe rejection. No restart occurs, and the application does not turn the failed proposal into a broader command. A model’s follow-up claim that it “has permission” changes nothing.
For a consequential action
Ask an authorized person to confirm separately
In this fictional system, Priya is an on-call engineer allowed to request a training VPN restart. After checking Priya’s permission and the exact service ID and reason, the application stores the request as pending. It does not restart the VPN yet.
1. Show the exact action
The app shows the target, reason, and expected impact to Sam, the fictional network service owner. Sam can approve or reject that specific pending request.
2. Check the approver
When Sam confirms, the application independently verifies Sam’s authenticated session and approval permission. It uses the stored, validated request rather than taking changed arguments from the model.
3. Execute once
Only after that check does the application execute the one approved restart for the training VPN. If Sam rejects it or the request is no longer valid, the app does not restart the service.
The model cannot approve
“Approved,” a second tool call, or a claim that Sam agreed is still model output. The confirmation must come through the application’s separate, permission-checked approval step.
Your turn
Review a proposed restart
Maya asks for help with the training VPN. The model proposes restartTrainingVpn(serviceId: "production-vpn", reason: "Restart now"). What should the application check, and should it execute this request?
Open the self-check
The model made a proposal; no action has happened. The application checks Maya’s actual permissions and rejects the production target because the tool is limited to training-vpn. It validates the reason and request shape as well. Since Maya cannot request a restart and the service ID is invalid for this tool, the safe result is rejection with no side effect and no approval prompt.
For a valid request from an authorized requester, the app can create a pending approval. A separate authorized person must review and confirm the exact action; only then can the application execute it. The model cannot provide that confirmation.