Safety, Security & Responsible AI·Question 27 of 70Intermediate

How do you design tool permissions for an agent, and how do you stop human approval gates from becoming rubber-stamping?

Type it the way you would explain it to an interviewer. A few sentences is enough; you can't break anything.

Model answer: the part to lead with

Start from the principle that tools are a product surface, not an API passthrough. The most common mistake is exposing an existing REST API or a whole MCP-style server to the model and calling it done. Design narrow tools instead: not execute_sql(query) but get_orders_for_customer(customer_id); not http_request(url) but fetch_from_allowlisted_docs(path). Every degree of freedom you give the model is a degree of freedom you give the attacker.

Full worked answer with diagram

Start from the principle that tools are a product surface, not an API passthrough. The most common mistake is exposing an existing REST API or a whole MCP-style server to the model and calling it done. Design narrow tools instead: not execute_sql(query) but get_orders_for_customer(customer_id); not http_request(url) but fetch_from_allowlisted_docs(path). Every degree of freedom you give the model is a degree of freedom you give the attacker.

The rules I would apply:

  • Read-only by default; writes are a deliberate, separately-reviewed decision.
  • Validate arguments server-side, at the tool boundary, with a real schema and real bounds: path roots, URL allowlists, amount ceilings, tenant predicates. Never rely on the prompt telling the model the rules.
  • Authorise against the human principal for this request, not against a standing service account.
  • Enforce policy in deterministic code outside the model. A refund tool that hard-caps at 50 USD cannot be talked into 5000.

Then approvals. The failure mode is real and worth naming: if you prompt the user 50 times a session, approval becomes muscle memory and the gate is theatre. Fixes:

Gate on irreversibility and blast radius, not on "is it a tool call". Reading is free. Sending, paying, deleting and publishing are not.

Show the effect, not the intent. Do not render the model's own description of what it is about to do; render the server-computed effect: this exact recipient, this exact body, this exact amount, this diff. The model's summary is attacker-influenceable, which makes it the worst possible thing to base consent on.

Tier it. Auto-approve under a threshold, prompt in a band, hard-deny above it with no approve button. A category with no safe version should not be approvable at all.

Batch and rate-limit approvals so each one carries information, and log the approver, the effect hash and the latency. Approvals granted in under two seconds are a metric: that is your rubber-stamping rate, and you should alert on it.

Worth sketching. Tiering by reversibility rather than by "is it a tool call" is the idea worth drawing, and the approval-latency arrow is what makes it a real control.

flowchart TD
    A["Tool call requested"] --> B["How reversible is the effect?"]
    B -->|"read only"| C["Auto-approve"]
    B -->|"write under the threshold"| D["Auto-approve, log the effect"]
    B -->|"inside the band"| E["Prompt with the server-computed effect"]
    B -->|"above the ceiling"| F["Hard deny, no approve button"]
    E --> G["Log approver, effect hash, latency"]
    G -->|"decided in under 2s"| H["Rubber-stamping metric"]

What a good answer covers

  • Start from the principle that tools are a product surface, not an API passthrough
  • The most common mistake is exposing an existing REST API or a whole MCP-style server to the model and…
  • Design narrow tools instead
  • Every degree of freedom you give the model is a degree of freedom you give the attacker
  • Read-only by default; writes are a deliberate, separately-reviewed decision

Key terms: Tier it · Batch and rate-limit approvals

Interviewer follow-ups to expect

  1. How would you decide the auto-approve threshold for a refund agent?

  2. What do you show a user approving something they cannot realistically evaluate, like a generated SQL migration?

Worked answer from AI-Engineer-Interview-Questions by Om (MIT), reformatted for LLM Prep · answer text last updated 6 November 2026 · scoring and review schedule by LLM Prep