Skip to main content
Glama

toggle_rule

Destructive

Enable or disable a firewall filter rule, staging the change for apply_changes and recording an undo that restores its prior state.

Instructions

[WRITE][risk=medium] Enable/disable a filter rule; reversible.

Reads the rule first so the harness records an undo that restores its prior enabled state. Staged only — run apply_changes to make it live. Pass dry_run=True to preview.

Args: uuid: Rule uuid (OPNsense) or id (pfSense), from list_rules. enable: True to enable the rule, False to disable. dry_run: If True, preview without changing. target: Firewall target name from config; omit for the default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYes
enableYes
targetNo
dry_runNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.8.0

TDQS

A4.9/5.0
Behavior5/5

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

Goes well beyond the annotations: it discloses that the rule is read first so the harness records an undo restoring the prior enabled state, that changes are staged rather than immediate, and that dry_run offers a preview. This is exactly the mutation-side-effect context an agent needs.

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

Conciseness4/5

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

Front-loaded with the operation class and risk, then behavioral notes, then a compact Args block. Every line earns its place, though the Args block is somewhat formatted-heavy for four short entries.

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

Completeness5/5

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

Covers prerequisites (uuid from list_rules), staging semantics, the required follow-up (apply_changes), preview mode, and default target behavior. With no output schema needed and annotations only covering safety flags, nothing an agent needs to call this correctly is missing.

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

Parameters5/5

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

Schema description coverage is 0%, so the description carries the full burden and does: uuid is defined as OPNsense uuid / pfSense id sourced from list_rules, enable is the target state, dry_run is a no-op preview, and target is a config-defined firewall name defaulting to the primary.

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

Purpose5/5

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

States a specific verb+resource ('Enable/disable a filter rule') and immediately qualifies it with reversibility, making it distinguishable from siblings like add_alias_entry or kill_states. The [WRITE][risk=medium] tag front-loads the operation class.

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

Usage Guidelines5/5

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

Explicitly says the change is staged and that apply_changes is required to make it live, and that dry_run=True previews. It also points to list_rules as the source of the uuid, giving the agent both the prerequisite and the follow-up tool.

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