mirror of
https://github.com/google-gemini/gemini-cli.git
synced 2026-05-13 05:12:55 -07:00
docs(policy-engine): link to tools reference for tool names and args (#22081)
Co-authored-by: Aashir Javed <Aaxhirrr@users.noreply.github.com> Co-authored-by: Sam Roberts <158088236+g-samroberts@users.noreply.github.com>
This commit is contained in:
@@ -71,7 +71,9 @@ primary conditions are the tool's name and its arguments.
|
|||||||
|
|
||||||
#### Tool Name
|
#### 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.
|
- **Wildcards**: You can use wildcards to match multiple tools.
|
||||||
- `*`: Matches **any tool** (built-in or MCP).
|
- `*`: 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
|
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
|
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
|
#### Execution environment
|
||||||
|
|
||||||
@@ -279,7 +283,11 @@ directory are **ignored**.
|
|||||||
|
|
||||||
### TOML rule schema
|
### 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
|
```toml
|
||||||
[[rule]]
|
[[rule]]
|
||||||
@@ -365,6 +373,9 @@ priority = 10
|
|||||||
|
|
||||||
To simplify writing policies for `run_shell_command`, you can use
|
To simplify writing policies for `run_shell_command`, you can use
|
||||||
`commandPrefix` or `commandRegex` instead of the more complex `argsPattern`.
|
`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
|
- `commandPrefix`: Matches if the `command` argument starts with the given
|
||||||
string.
|
string.
|
||||||
|
|||||||
Reference in New Issue
Block a user