Remove it, don't watch it
D3 · IntegrationGuide lines 3.1, 5.1
Least privilege means an agent gets the smallest set of tools and permissions its job needs. Agents often end up with more by accident: a team connects a whole MCP server, or reuses an account that can do everything, because it is quicker.
There are two kinds of control. A preventive control stops something from being possible: removing a tool, or narrowing what a tool accepts. A detective or compensating control lets it stay possible but watches it: a log, an alert, a confirmation step, a line in the prompt. If the role never needs the capability, a preventive control wins, because a capability that is not there cannot be misused by a confused model or a prompt injection.
The trap is that logging and approval sound responsible, and sometimes they are right. Approval wins when the role really does need a risky action now and then. Narrowing wins when the role needs a tool but only part of what it can do. The deciding fact is always the same question: does this role need this capability?
Change one fact
A property company's tenant assistant answers questions about leases and records repair requests. It was connected to the property system's full toolset, which also includes a tool that cancels leases. Tenants chat with it directly through the company's app. Cancelling a lease is hard to undo. What should the architect change first?
Words in the stem that signal this trap
- “has never needed…” or “staff only ever…”
- an agent connected to a full MCP server or a shared admin account
- options that add logging, alerts or a confirmation step to a tool
- “part of their job” or “a few times a month” (approval may win)
- a tool that can act on any record when the role needs one
Practice
A museum's ticketing chatbot answers visitor questions and books timed-entry tickets. It calls the ticketing platform with the platform's admin key, which can also issue refunds, change prices and export the full visitor list. The chatbot has never needed to do any of those three things. Which change best reduces the risk?
- Turn on alerts whenever the chatbot's key changes a price or exports visitor data.
- Add a staff approval step before any refund, price change or export can run.
- Give the chatbot a key limited to checking availability and booking tickets.
- Add a system-prompt rule telling the chatbot not to refund, reprice or export.
Show answer
Answer: C. The deciding fact: the chatbot has never needed refunds, price changes or exports. A narrowly scoped key removes those capabilities instead of watching them.
- A ❌ Works, but an alert fires after the price has changed or the list has left.
- B ❌ Works, but it keeps capabilities the role never uses; approval fits when the role sometimes needs the action.
- C ✅ Give the chatbot a key limited to checking availability and booking tickets.
- D ❌ Works, but a prompt rule is followed most of the time, not always, and the key can still do all three.
A cloud-cost agent's documented job includes deleting old database snapshots, which saves the company a large sum each month. A deletion cannot be undone, and last month the agent picked a snapshot that auditors still needed. The finance team wants to keep the savings. What should the architect do?
- Keep the delete tool, with an engineer approving each deletion before it runs.
- Remove the delete tool and have engineers delete old snapshots by hand.
- Keep the delete tool, and log each deletion for the team to review weekly.
- Move the agent to a more capable model that applies the retention rules better.
Show answer
Answer: A. The deciding fact: deleting snapshots is part of the agent's job, and a deletion cannot be undone. Approval before the action keeps the savings and stops the wrong deletion.
- A ✅ Keep the delete tool, with an engineer approving each deletion before it runs.
- B ❌ Works, but it blocks a task the role is meant to do; removal wins when the role never needs the tool.
- C ❌ Works, but a weekly review finds the lost snapshot after it is gone for good.
- D ❌ Works, but a better model still makes mistakes, and nothing checks the irreversible step.
A recruiting assistant reads interviewers' calendars and books interview slots. It was connected to the HR system with a full-access account that also reaches salary records and offer letters. The assistant has never needed salaries or offers. Which two changes best reduce the risk?
- Add a weekly audit of every salary record the assistant opens.
- Remove the salary and offer-letter tools from the assistant's configuration.
- Ask a recruiter to confirm before the assistant opens any offer letter.
- Run the assistant under its own account that can read calendars and book slots.
- State in the system prompt that salary data is confidential and off limits.
Show answer
Answer: B and D. The deciding fact: the role never needs salaries or offers. Least privilege works at two layers: remove the tools the agent can see, and scope the account those tools run under, so one slip is caught by the other.
- A ❌ Works, but an audit shows the exposure only after the data has been read.
- B ✅ Remove the salary and offer-letter tools from the assistant's configuration.
- C ❌ Works, but confirmation keeps a capability the role never uses.
- D ✅ Run the assistant under its own account that can read calendars and book slots.
- E ❌ Works, but a prompt instruction is not an access control.