Skip to main content
Glama
lucamarien

OPNsense MCP Server

by lucamarien

opn_update_firewall_rule

Modify a firewall rule's settings via UUID; unconfirmed changes automatically revert after 60 seconds.

Instructions

Update an existing MVC firewall rule by UUID with savepoint protection.

Use this when you need to modify a firewall rule's action, source/destination, protocol, ports, or other properties. Only the parameters you provide are changed; all other settings are preserved.

Changes auto-revert in 60 seconds unless confirmed with opn_confirm_changes. Use opn_list_firewall_rules first to find the UUID.

Parameters:

  • uuid: rule UUID (from opn_list_firewall_rules)

  • action: 'pass', 'block', or 'reject'

  • direction: 'in' or 'out'

  • interface: interface name (e.g. 'lan', 'wan', 'opt1')

  • ip_protocol: 'inet' (IPv4), 'inet6' (IPv6), or 'inet46' (dual-stack)

  • protocol: 'any', 'TCP', 'UDP', 'TCP/UDP', 'ICMP', etc.

  • source_net: source address/network or 'any'

  • source_not: invert source match

  • source_port: source port number or range

  • destination_net: destination address/network or 'any'

  • destination_not: invert destination match

  • destination_port: port number or range

  • gateway: force traffic via specific gateway, or empty to clear

  • log: enable/disable logging

  • quick: first-match wins (True) or last-match-wins (False)

  • sequence: rule ordering within priority group

  • categories: comma-separated category UUIDs

  • description: human-readable rule description

  • enabled: enable/disable the rule

Returns: dict with 'revision' (str), 'uuid' (str), and 'result' (str).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYes
actionNo
directionNo
interfaceNo
ip_protocolNo
protocolNo
source_netNo
source_notNo
source_portNo
destination_netNo
destination_notNo
destination_portNo
gatewayNo
logNo
quickNo
sequenceNo
categoriesNo
descriptionNo
enabledNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Discloses savepoint protection, auto-revert in 60 seconds, partial update semantics, and return value structure. No annotations exist, so description carries full burden and does so well.

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?

Front-loaded with purpose and key feature, followed by usage guidance, then parameter list. Every sentence adds value; no fluff.

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 19 parameters, 1 required, and no output schema, the description provides thorough parameter explanations and return value format, plus the auto-revert workflow. Fully covers tool behavior.

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 coverage is 0%, so description must define each parameter. Lists all 19 parameters with allowed values (e.g., 'pass, block, reject' for action) and usage context. Extremely helpful.

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?

Clearly states the verb 'update', resource 'firewall rule', and method 'by UUID' with savepoint protection. Distinguishes from sibling add/delete/toggle firewall rule tools.

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 when to use ('modify a firewall rule...'), provides workflow (list first for UUID, then update, then confirm with opn_confirm_changes), and explains partial update behavior.

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/lucamarien/opnsense-mcp-server'

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