Skip to main content
Tool policies are a security layer over the tools a model or agent invokes (function tools and MCP tools). It does not configure agents; it governs what the tools they call are allowed to do. Tools are auto-discovered from real usage, and you assign each one a trust policy that the gateway enforces on every request
This is a governance feature, not agent setup. Agents are configured on the Agentic pages; Tool Policies is the safety layer on the tools those agents (and any tool-calling completion) use

How tools get here

Tools are discovered automatically. Make a chat completion (or run an agent) that returns tool_calls, and each tool is recorded with a default policy and flagged as needing review. The page is empty until that first tool-calling request happens Discovery runs through the spend pipeline, so a newly used tool appears after a short flush delay rather than instantly

The two policies

Each tool has an input policy (governs the tool being called) and an output policy (governs the tool’s result):

The trust chain

The trusted input policy is the interesting one. Before a tool marked input_policy=trusted (a sensitive or privileged tool) is allowed to run, the guardrail checks whether the conversation already contains output from any output_policy=untrusted tool. If it does, the request is blocked. This stops tainted, possibly prompt-injected content from an untrusted tool from ever reaching a privileged action. blocked is the hard kill switch for a tool you never want called

Turn enforcement on

Discovering a tool and setting its policy does nothing until the tool_policy guardrail is active. Enable it in the gateway config with default_on: true; it is safe to leave on globally because newly discovered tools default to untrusted (allowed), so only blocked tools and the trust chain are enforced:
Recreate the gateway after changing the config so it loads the guardrail

Set a policy

Use the Tool Policies page (Tools -> Tool Policies) to change a tool’s input or output policy, or the API:
The endpoint also accepts team_id, key_hash, or key_alias to scope a policy override to a specific team or key instead of the global default

Verify end to end

Proven live against the running gateway:
Before the guardrail was enabled the blocked policy had no effect; once it is on, the blocked tool is rejected. Set it back to untrusted to allow the tool again

How this relates to agents

An agent’s tool calls are governed here just like any other request. The mental model: agents and keys decide who and what capabilities, tool policies decide whether the tools those agents call are allowed to run. They are complementary