Skip to main content
Glama

opnsense_toggle_firewall_rule

DestructiveIdempotent

Enable or disable an OPNsense firewall rule by UUID. Changes are staged, so apply them afterward to take effect.

Instructions

Enable or disable a single firewall rule.

Requires OPNSENSE_ALLOW_WRITE=true. The change is staged, not live: nothing takes effect until opnsense_apply_firewall_changes runs. Take a savepoint before toggling anything that could affect your own access path, so an unreachable firewall reverts itself after 60 seconds instead of needing console access.

Args: params (ToggleRuleInput): Validated input containing: - uuid (str): Rule UUID - enabled (bool): True to enable, False to disable - response_format (ResponseFormat): 'markdown' or 'json'

Returns: str: Confirmation text noting that an apply is still required, or JSON: {"result": str, "uuid": str, "enabled": bool, "applied": false}

Error Handling: - Returns a write-disabled explanation when OPNSENSE_ALLOW_WRITE is not set - Returns a not-found message when the UUID does not exist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paramsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes
Behavior5/5

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

The description discloses critical behavioral details beyond the annotations: the change is staged and not live, it requires a specific environment variable, and it may impact the user's own access path. The error handling is also described. These enrich the annotation hints (destructive, write, idempotent) without contradiction.

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 well-structured into concise sections: action, usage notes, args, returns, and error handling. Every sentence carries useful information, and the key behavioral caveats are front-loaded. It is detailed without being verbose.

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?

Given the annotations and output schema, the description fully covers prerequisites, staging, return format, and error cases. It also provides operational advice (savepoint) that is essential for safe usage. No significant gaps remain.

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?

The Args section lists uuid, enabled, and response_format with brief descriptions, but the input schema already provides detailed descriptions for these parameters, including the response_format distinction between compact markdown and full JSON. The description adds minimal extra meaning beyond restating the schema, so it is adequate but not exceptional.

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?

The description opens with 'Enable or disable a single firewall rule,' which uses a specific verb and resource, clearly distinguishing it from sibling tools like search_firewall_rules, get_firewall_rule, and apply_firewall_changes. It immediately conveys the exact action and scope.

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?

The description explicitly states the prerequisite (OPNSENSE_ALLOW_WRITE=true), explains that changes are staged and require opnsense_apply_firewall_changes to take effect, and advises taking a savepoint before toggling rules that could affect the user's own access. This provides clear when-to-use and safety guidance, going well beyond a simple action statement.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/aesaganda/opnsense-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server