What is a Forbidden Argument?

2 min read Updated

A policy rule that blocks tool calls containing a specific argument or argument value. Forbidden argument constraints prevent agents from using dangerous parameters — for example, forbidding force: true on destructive operations or blocking admin-level privilege escalation flags.

WHY IT MATTERS

Some tool arguments are inherently dangerous. A force: true flag bypasses safety checks. A --no-verify option skips validation. A recursive: true parameter on a delete operation turns a single-file removal into a directory wipe. Forbidden argument constraints let policies block these specific danger signals.

This is more nuanced than simply blocking the entire tool. The tool itself might be perfectly safe — it is a specific argument or argument value that creates risk. By forbidding the dangerous parameter rather than the entire tool, policies maintain agent productivity while eliminating the most hazardous usage patterns.

Forbidden argument constraints are particularly valuable for tools with broad capabilities. A shell execution tool, a database query tool, or a cloud infrastructure tool might accept hundreds of valid parameter combinations. Rather than trying to enumerate every safe combination, operators forbid the known-dangerous ones — a much more maintainable approach.

HOW POLICYLAYER USES THIS

Intercept supports forbidden argument rules in YAML policies. The forbidden: true flag blocks calls containing the specified argument entirely. For value-specific blocking, forbidden_values denies calls where the argument matches any value in the list — e.g. blocking force: true while allowing force: false. Violations are logged to the audit trail with the specific forbidden argument that triggered the denial.

FREQUENTLY ASKED QUESTIONS

Can I forbid an argument entirely or just specific values?
Both. Use forbidden: true to block the argument regardless of its value. Use forbidden_values to block only specific values while allowing others.
What if the agent needs the forbidden argument in some cases?
Use policy conditions to make the prohibition conditional — e.g. forbid force: true unless the agent has an elevated role or the operation targets a non-production environment.
How does this interact with required arguments?
An argument cannot be both required and forbidden in the same policy rule — that would deny every call. But different tools or conditions can apply different rules to the same argument name.

FURTHER READING

Enforce policies on every tool call

Intercept is the open-source MCP proxy that enforces YAML policies on AI agent tool calls. No code changes needed.

npx -y @policylayer/intercept
github.com/policylayer/intercept →
// GET IN TOUCH

Have a question or want to learn more? Send us a message.

Message sent.

We'll get back to you soon.