Skip to content
All articles

AI security · Tool calls

The model proposes. Authority checks twice.

A model's tool call is a proposal. A policy enforcement point checks it, and the downstream service authorizes again. The model sees a capability handle, never a raw secret.

· 3 min read

A tool call passing two independent checks. The model proposes a tool call, which is a proposal and not authority. First, a policy enforcement point checks tenant, scope, purpose, argument schema, destination, side-effect class, approval, budget and idempotency. Second, the downstream service authorizes again on its own. Secrets stay in a broker or the downstream service; the model sees a capability handle, never a raw token, and protected services never treat a prompt as authorization. Enforcement sits where the protected asset is owned.

The course's production reference architecture is built on one placement rule: enforce where the protected asset is owned.

The path of a tool call

The edge authenticates the principal, limits the shape and rate of the request, and assigns a trace. An orchestration service builds a typed request, but it does not inherit unlimited service credentials. Retrieval runs authorization before similarity ranking. The model receives minimized evidence and capability descriptions, not raw secrets.

Then the model proposes a tool call, and that call is only a proposal. It passes through a policy enforcement point that checks:

  • tenant, scope and purpose;
  • the argument schema and the destination;
  • the side-effect class and any required approval;
  • budget and idempotency.

After that, the downstream service authorizes the call again, on its own terms.

Why twice

Each check has a different owner and knows different things. The policy gate knows the request's context: who is asking, for what purpose, with what approval. The downstream service owns the asset and its rules. The figure's caption says it directly: independent enforcement surrounds the model, and protected services never trust a prompt as authorization.

Common Mistake

Putting the rule in the prompt. Generated arguments are untrusted input, and a prompt is not a permission check. If the only thing between the model and a side effect is an instruction, the instruction is the whole control.

Secrets and the rest of the system

Secrets stay in a broker or in the downstream service, so the model sees a capability handle rather than a raw token. Sandboxes isolate generated code and parsers, and network policy blocks arbitrary destinations. Telemetry records identities, versions, hashes, policy decisions, tool outcomes, cost and safety events while minimizing sensitive content. Kill switches work independently for a model route, a connector, a tool class, a tenant, an ingestion pipeline and the outbound network path.

Get one diagram a week

A short article built around one engineering diagram, from the same library as these courses.

One diagram-led article a week on AI and systems engineering. We email you once to confirm, and every newsletter has an unsubscribe link. Privacy policy