Skip to main content
Glama

port_forward_add

Destructive

Create a port-forward rule mapping WAN ports or ranges to a LAN host, previewing UCI changes first and applying them only with confirm=true, with automatic rollback if the router stops responding.

Instructions

Forward a port (or range like 8000-8010) from the src zone (default wan) to a LAN host. proto: tcp, udp or "tcp udp". dest_port defaults to src_dport. Without confirm=true this only returns a preview of the UCI changes and changes nothing. With confirm=true it applies them with the router's rollback timer, checks the router still answers, and confirms; if the check fails, the router restores the old config by itself.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "name": "<name>",
      "src_dport": "<src_dport>",
      "dest_ip": "<dest_ip>"
    },
    "name": "port_forward_add"
  }
}

Input Schema

NameRequiredDescriptionDefault
srcNowan
destNolan
nameYes
protoNotcp udp
confirmNo
dest_ipYes
enabledNo
dest_portNo
src_dportYes

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Goes well past the annotations by disclosing the preview-by-default behavior, the router rollback timer, the post-apply reachability check, and automatic config restore on failure. That is exactly the kind of mutation-safety context annotations cannot convey. It stops short of stating permission requirements or what a preview response looks like, keeping it off a 5.

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 action and range syntax, and nearly every clause adds distinct information. The second sentence is a long semicolon-chained construction that is slightly harder to parse than necessary, but nothing is wasted.

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?

An output schema exists, so return values need not be described, and the destructive-mutation semantics are covered thoroughly. What remains thin is guidance on the identity fields (name, enabled, dest zone) for a 9-parameter tool, which would matter if the call needs to be repeated or corrected.

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?

Schema coverage is 0%, so the description carries real weight: it documents the src zone default (wan), the proto value set (tcp/udp/'tcp udp'), the dest_port-to-src_dport default, and confirm's semantics. However, four of nine parameters (name, dest, dest_ip, enabled) get no explanation at all, leaving a meaningful gap against a 0% baseline.

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 and resource ('Forward a port ... to a LAN host') and even spells out the accepted range syntax (8000-8010), which immediately separates it from port_forward_remove and the firewall_rule_* siblings.

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?

Gives a clear decision rule for the tool's main fork: without confirm=true it is a dry-run preview, with confirm=true it applies changes. It does not name port_forward_remove as the alternative for undoing a forward, but the when-to-use condition for this tool is unambiguous.

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