Skip to main content
Glama

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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
usersNoJSON array of usernames.
groupsNoJSON array of group names.
resultNoResult.yes
rule_nameYesDescriptive rule name.
output_pathNoOutput file path.
action_patternYesAction ID pattern.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden of behavioral disclosure. It does not state whether the tool writes a file to output_path, prints content to stdout, overwrites existing files, or requires any Polkit environment assumptions. 'Generate' implies creation but leaves the actual side effects and return behavior opaque.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, front-loaded sentence with no filler or repetition. Every word contributes to identifying the tool's purpose and output format.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and no output schema, the description is too sparse to be complete. It does not explain the behavior of output_path when null, what the generator returns, whether files are written, or how the rule content is constructed. An agent would still have to make risky assumptions about the tool's output and side effects.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 100%, so the input schema fully documents all six parameters. The description adds no additional parameter-level context, which matches the baseline score of 3 for high schema coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a specific verb ('Generate') and a clear resource ('Polkit-1 JavaScript rule (.rules)') with an explicit purpose ('pre-authorizing specific actions'). It does not explicitly contrast itself with the sibling polkit_generate_policy, but the '.rules' format makes the target resource clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The phrase 'for pre-authorizing specific actions' implies the primary use case, but the description gives no guidance on when to choose this tool over polkit_generate_policy, polkit_check_auth, or other Polkit siblings. There are no exclusions or alternative-routing hints.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.