Skip to main content
Glama

port_forwarding

Destructive

Configure TP-Link router port forwarding: list, add, update, or remove virtual server, port-triggering, and DMZ rules, with dry-run plans before applying changes.

Instructions

Port forwarding. kind=vs (virtual servers, default) | pt (port triggering) | dmz. action=list | add (rule={name, external_port, internal_port, ip, protocol ALL|TCP|UDP, enable}) | update (name, rule) | remove (name); for dmz: list | enable (ip) | disable. Overlapping external ports are refused.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "port_forwarding"
  }
}

Input Schema

NameRequiredDescriptionDefault
ipNo
kindNovs
nameNo
ruleNo
applyNofalse (default) = dry run: show the plan, diff, warnings and risk, send nothing. true = send it.
actionNolist
revealNoShow secrets (passwords/keys) unmasked.
routerNoWhich router (see router_status 'routers'); default main.main
confirm_tokenNoRequired with apply=true for CRITICAL changes: the token from the dry run (valid 5 minutes, bound to the exact plan and current router state).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and non-idempotent, so the safety profile is known. The description adds one real behavioral fact — overlapping external ports are refused — which is useful validation context. However, it says nothing about the dry-run/confirm_token workflow required for critical changes, which for a destructive tool is the most important behavior to surface.

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?

Highly front-loaded and information-dense, with pipe-delimited operation lists that are scannable. The terse parenthetical notation is compact but slightly cryptic on first read, and the rule-field list is compressed into a single clause.

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

Completeness3/5

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

For a destructive, 9-parameter tool with no output schema, the description covers the operation space but omits the two-phase dry-run/apply contract, the confirm_token requirement, and what list returns. The schema field descriptions partially cover apply and confirm_token, but an agent cannot fully predict the call sequence from this definition alone.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 44%, so the description must carry weight and it does: it defines the kind enum meanings, the action semantics per kind, the fields inside the rule object for add (name, external_port, internal_port, ip, protocol with ALL|TCP|UDP, enable), and uses name as the rule identifier for update/remove. It leaves the meaning of router, reveal, apply, and confirm_token entirely to the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific resource (port forwarding) and enumerates the three rule kinds (vs, pt, dmz) plus the operations available for each, so an agent can map intent to action without opening the schema. It does not distinguish itself from other networking siblings such as internet or routing, so it stops short of a 5.

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 kind/action matrix effectively tells the agent which operation to pick for virtual servers, port triggering, and DMZ, including the dmz-specific enable/disable forms. It gives no explicit when-not guidance or safety instruction (e.g., run with apply=false before applying), which keeps it from a 5.

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