polkit_generate_rule
Creates a Polkit-1 .rules JavaScript rule for pre-authorizing specific actions. Specify action pattern, users/groups, and result to grant permissions without prompts.
Instructions
Generate a Polkit-1 JavaScript rule (.rules) for pre-authorizing specific actions.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"rule_name": "<rule_name>",
"action_pattern": "<action_pattern>"
},
"name": "polkit_generate_rule"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| users | No | JSON array of usernames. | |
| groups | No | JSON array of group names. | |
| result | No | Result. | yes |
| rule_name | Yes | Descriptive rule name. | |
| output_path | No | Output file path. | |
| action_pattern | Yes | Action ID pattern. |