Skip to main content
Rules are the building blocks of policies. Each rule defines a specific condition that must be satisfied for a tool call to proceed. A policy can contain multiple rules of different types.

Tool patterns

Several rule types accept a tools array that scopes the rule to specific tool names. Two pattern forms are supported:
  • Exact match: "file.read" matches only file.read
  • Trailing wildcard: "file.*" matches file.read, file.write, file.delete, and any other tool starting with file.
  • Match all: "*" matches any tool name

1. tool_allowlist

An allowlist explicitly permits the listed tools. If the requested tool is not in the list, the request is denied.
Using a wildcard to allow an entire namespace:
An allowlist rule that matches the requested tool affirmatively contributes to an allowed decision. The policy evaluator requires at least one affirmative rule to return allowed.

2. tool_denylist

A denylist explicitly blocks the listed tools. If the requested tool is in the list, the request is denied immediately.
Important: A denylist does not implicitly allow everything else. If your policy contains only denylist rules and no allowlist rules, the policy will never produce an allowed decision — tools not on the denylist simply won’t match, and evaluation will fall through to the next policy (or default deny).
To block specific tools while allowing others, use a denylist policy at higher priority combined with a separate allowlist policy at lower priority. See Policies for an example.

3. parameter_constraint

A parameter constraint validates the values of tool parameters before allowing the call. If any parameter fails its constraint, the request is denied.
Use the tools field to scope the constraint to specific tools. Omit tools to apply the constraint to all tools. Example: restrict file writes to paths under /home/
Example: restrict an environment parameter to known values
Example: cap a numeric parameter within a safe range
Parameter values that match a sensitive key pattern (such as password, token, or api_key) are redacted in denial reasons and audit log entries.

4. rate_limit

A rate limit caps how many times an agent can successfully call a tool within a rolling time window.
Use the tools field to scope the limit to specific tools. Omit tools to apply the limit across all tool calls. Example: cap web searches to 100 per hour
Example: global call limit across all tools
Only calls that resulted in allowed count against the rate limit budget. Denied requests do not consume quota.

5. time_based

A time-based rule restricts tool calls to certain hours of the day or days of the week.
If timezone is omitted, times are evaluated in UTC. Example: business hours only, Monday–Friday, US Central
Example: restrict to weekends only

Keep denylist rules and allowlist rules in separate policies rather than mixing them in the same policy. A policy containing only denylist rules will never produce an allowed result — it can only deny or pass through. Use priority to layer a high-priority deny policy on top of a lower-priority allow policy. This keeps your intent explicit and your evaluation logic predictable.