Skip to content

Review: Gemini CLI Policy Engine Documentation #18750

@AlexeyPlatkovsky

Description

@AlexeyPlatkovsky

Review: Gemini CLI Policy Engine Documentation

Page: https://geminicli.com/docs/core/policy-engine/#toml-rule-schema


Issues Found

1. No reference list of available tool names

The TOML rule schema requires a toolName value, but the policy engine page never lists what tool names are valid. The only tools mentioned incidentally are write_file, replace, read_file, run_shell_command and glob — and only as brief inline examples, not as a proper reference.

To write a rule for write_file, a user has to know the exact tool name upfront. There is no link to a tools index or any indication of where to find the full list.

2. commandPrefix is documented on the policy engine page but absent from the shell tool page

The policy engine page documents commandPrefix as a top-level rule field and even uses it in the Quick Start example. However, on the [Shell tool page](https://geminicli.com/docs/tools/shell/), commandPrefix does not appear at all — the shell tool's own arguments are command, description, and directory.

This is not necessarily wrong (the two pages cover different things — policy rules vs. tool invocation arguments), but the relationship is never explained. A reader of the shell tool page would have no idea that commandPrefix exists as a policy shorthand, and vice versa.

3. argsPattern requires knowing the JSON structure of tool arguments

The argsPattern field matches against the JSON representation of a tool's arguments. To use it correctly for tools other than run_shell_command, a user needs to know what keys each tool's JSON arguments contain. This information is not available on the policy engine page or linked from it.


Suggestion

Add a reference section listing available built-in tools with their argument names and types — or at minimum, link to such a reference from the policy engine page. This would make toolName and argsPattern usable without guesswork.

Pinned by g-samroberts

Metadata

Metadata

Assignees

Labels

area/documentationGemini CLI documentation tasks and issuesarea/enterpriseIssues related to Telemetry, Policy, Quota / Licensinghelp wantedWe will accept PRs from all issues marked as "help wanted". Thanks for your support!priority/p3Backlog - a good idea but not currently a priority.

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions