Skip to main content
Glama
lucamarien

OPNsense MCP Server

by lucamarien

opn_update_nat_rule

Update an existing NAT port forwarding rule by UUID, changing target IP, port, or other properties. Changes auto-revert in 60 seconds unless confirmed.

Instructions

Update an existing NAT port forwarding rule by UUID with savepoint protection.

Use this when you need to change the target IP, port, or other properties of a NAT rule. 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_nat_rules first to find the UUID.

Parameters:

  • uuid: NAT rule UUID (from opn_list_nat_rules)

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

  • protocol: 'TCP', 'UDP', or 'TCP/UDP'

  • destination_port: external port to forward (e.g. '8080', '3000-3010')

  • target_ip: internal IP address to forward to

  • target_port: internal port

  • description: human-readable description

  • enabled: enable/disable the rule

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
uuidYes
interfaceNo
protocolNo
destination_portNo
target_ipNo
target_portNo
descriptionNo
enabledNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses critical behaviors: 'Changes auto-revert in 60 seconds unless confirmed with opn_confirm_changes' and 'Only the parameters you provide are changed; all other settings are preserved.' This is transparent for a mutation tool.

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 concise and well-structured: a clear one-liner, usage guidance, parameter list, and return format. Every sentence is valuable, and the most important information is front-loaded.

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

Completeness4/5

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

The description covers usage, parameter details, auto-revert behavior, and return format. It is complete given the presence of an output schema. However, it could be slightly more explicit about the system context (e.g., OPNSense firewall) and what 'savepoint protection' entails.

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?

The schema has 0% description coverage, but the description provides detailed explanations for all 8 parameters, including examples (e.g., 'interface: source interface (e.g. "wan", "opt1")', 'destination_port: external port to forward (e.g. "8080", "3000-3010")'). This adds substantial meaning beyond the schema.

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 clearly states the tool's function: 'Update an existing NAT port forwarding rule by UUID with savepoint protection.' It specifies the verb (update), resource (NAT rule), and key details (UUID, savepoint). This distinguishes it from siblings like opn_add_nat_rule and opn_delete_nat_rule.

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

Usage Guidelines4/5

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

The description explicitly says 'Use this when you need to change the target IP, port, or other properties of a NAT rule' and advises to 'Use opn_list_nat_rules first to find the UUID.' This provides clear context and direction, though it does not explicitly state when not to use it.

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