From 90895efb29e404ce21d8b42464dca057fc909f0b Mon Sep 17 00:00:00 2001 From: Aashir Javed <150792417+Aaxhirrr@users.noreply.github.com> Date: Thu, 30 Apr 2026 11:02:18 -0700 Subject: [PATCH] docs(policy-engine): link to tools reference for tool names and args (#22081) Co-authored-by: Aashir Javed Co-authored-by: Sam Roberts <158088236+g-samroberts@users.noreply.github.com> --- docs/reference/policy-engine.md | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/docs/reference/policy-engine.md b/docs/reference/policy-engine.md index d9dc21f49c..95e65b33bd 100644 --- a/docs/reference/policy-engine.md +++ b/docs/reference/policy-engine.md @@ -71,7 +71,9 @@ primary conditions are the tool's name and its arguments. #### Tool Name -The `toolName` in the rule must match the name of the tool being called. +The `toolName` in the rule must match the name of the tool being called. For a +complete list of built-in tool names, see the +[Tools reference](/docs/reference/tools#available-tools). - **Wildcards**: You can use wildcards to match multiple tools. - `*`: Matches **any tool** (built-in or MCP). @@ -87,7 +89,9 @@ The `toolName` in the rule must match the name of the tool being called. If `argsPattern` is specified, the tool's arguments are converted to a stable JSON string, which is then tested against the provided regular expression. If -the arguments don't match the pattern, the rule does not apply. +the arguments don't match the pattern, the rule does not apply. For a list of +argument keys available for each tool, see the **Parameters** in the +[Tools reference](/docs/reference/tools#available-tools). #### Execution environment @@ -279,7 +283,11 @@ directory are **ignored**. ### TOML rule schema -Here is a breakdown of the fields available in a TOML policy rule: +This section describes the fields available in a TOML policy rule. + +For valid built-in `toolName` values and their argument structures (used by +`argsPattern`), see the +[Tools reference](/docs/reference/tools#available-tools). ```toml [[rule]] @@ -365,6 +373,9 @@ priority = 10 To simplify writing policies for `run_shell_command`, you can use `commandPrefix` or `commandRegex` instead of the more complex `argsPattern`. +These are policy-rule shorthands, not arguments of the `run_shell_command` tool +itself. For the tool's invocation arguments, see [Shell tool](/docs/tools/shell) +and [Tools reference](/docs/reference/tools#available-tools). - `commandPrefix`: Matches if the `command` argument starts with the given string.