nemoguardrails.server.hooks.tool_policy
nemoguardrails.server.hooks.tool_policy
The hooks server’s tool policy: which tools an agent’s call may use, and which of their arguments it may pass.
Module Contents
Classes
Functions
Data
API
Dataclass
hooks_server.allowed_tools, blocked_tools and allow_unlisted_tools, read once when the server starts.
allow_unlisted
allowed
blocked
The arguments name’s allowed_tools entry lists, or None when any argument is allowed.
Whether blocked_tools names name bare, which blocks every call to it.
Why the policy denies a call to name with arguments, or None when it lets the call through.
Whether every call to name is denied: it’s blocked by name, or unlisted while unlisted tools are denied.
classmethod
The policy a config’s hooks_server section sets.
Each tool a list names, with its entry’s arguments, or None for a bare name.