Skip to main content
Glama
lucamarien

OPNsense MCP Server

by lucamarien

opn_add_nat_rule

Create a temporary NAT port forwarding rule to redirect an external port to an internal host, with automatic rollback in 60 seconds unless changes are confirmed.

Instructions

Create a NAT port forwarding rule with savepoint protection.

Use this when you need to forward an external port to an internal host. Changes auto-revert in 60 seconds unless confirmed with opn_confirm_changes.

Parameters:

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

  • target_ip: internal IP address to forward to (e.g. '192.168.1.100') — required

  • interface: source interface (default 'wan')

  • protocol: 'TCP', 'UDP', or 'TCP/UDP' (default 'TCP')

  • target_port: internal port (default: same as destination_port)

  • description: human-readable description

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
destination_portNo
target_ipNo
interfaceNowan
protocolNoTCP
target_portNo
descriptionNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Given no annotations, the description discloses the critical auto-revert behavior (60 seconds) and the need for confirmation via opn_confirm_changes. It does not cover permissions or error states, but provides sufficient behavioral context.

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 efficiently structured with a clear opening statement followed by a bullet-like list of parameters. Every sentence adds value without redundancy.

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 purpose, usage, parameters, and behavioral quirks. An output schema is referenced (dict with revision, uuid, result), so no need to detail returns. Complete for the tool's complexity.

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 fully compensates by explaining all 6 parameters with examples, defaults, and required fields. This adds significant value.

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 'Create a NAT port forwarding rule' and explains the function. It distinguishes from siblings like opn_delete_nat_rule and opn_update_nat_rule by focusing on creation and mentioning savepoint protection.

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?

Explicitly says 'Use this when you need to forward an external port to an internal host' and mentions auto-revert with confirmation, but does not list explicit exclusions or alternatives.

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