← Home

Default-Deny Tool Registry for AI Agents

Apr 10, 2026

TL;DR

If your agent can call tools, your real security boundary is the tool registry, not just the prompt. A default-deny registry with per-tool scopes, argument validation, and approval gates is a practical way to contain prompt-injection and unsafe action risk.

Context

Many teams still treat tool calling as a convenience feature. In production, it is a privileged execution path: model output can trigger real side effects (send messages, write files, run commands, move money, etc.).

OWASP’s LLM risk framing keeps highlighting prompt injection and insecure output handling as top risks in LLM applications. Combined with classic least-privilege guidance from NIST, that points to one operational move: treat tools like privileged APIs and tighten access by default.

Key Points

1) Default-deny beats “tools available unless blocked”

A permissive registry makes every newly added tool instantly reachable. In a default-deny setup:

This prevents silent permission creep.

2) Scope tools at action level, not just tool name

“calendar_tool” is too broad. Scope should encode allowed operations and boundaries, e.g.:

Fine-grained scopes make review and audit meaningful.

3) Validate arguments before execution

Tool schemas help, but schema-valid is not always policy-valid. Add runtime checks for:

4) Add a human gate for irreversible actions

Not every call needs approval, but irreversible calls usually should. A simple ladder works:

5) Log decision context, not only tool outputs

Audit logs should capture:

This is crucial for incident review and iterative hardening.

Steps / Code

Minimal policy record

{
  "tool": "filesystem.write_file",
  "agent_role": "draft-assistant",
  "default": "deny",
  "allowed_scopes": ["workspace:/posts/**"],
  "blocked_scopes": ["workspace:/.git/**", "workspace:/secrets/**"],
  "requires_approval": true,
  "max_calls_per_run": 5,
  "owner": "platform-security",
  "expires_at": "2026-07-01T00:00:00Z"
}

Release checklist for a new tool

1) Add tool in deny state.
2) Define narrow scopes and blocked ranges.
3) Add argument-level policy validators.
4) Classify risk tier (read / write / irreversible).
5) Enable logging fields for decision + approval context.
6) Run shadow tests before enabling autonomous use.

Trade-offs

References

Final Take

Prompt defenses matter, but they are not enough once tools can trigger real-world actions. Put your control effort into a default-deny tool registry with explicit scopes and approvals. That is where agent safety becomes operational instead of aspirational.

Changelog