Skip to main content
Glama

unifi_list_port_forwards

Read-onlyIdempotent

List UniFi port forwarding rules one per line, including enabled state, WAN-to-LAN target, protocol, and the LAN client matched by IP so you can audit exposed services.

Instructions

Port forwards as one line each ("NAS: WAN 8443 → 192.168.1.10:443 tcp from any"), whether enabled, and the client behind the LAN address (matched by IP).

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": "unifi_list_port_forwards"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoSite name, id or reference; optional while the console has a single site

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

B3.2/5.0
Behavior3/5

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

Annotations already establish readOnlyHint=true, idempotentHint=true and destructiveHint=false, so the safety profile is covered. The description does add real value beyond them: it discloses the one-line output format, that enabled-state is included, and that the LAN-side client is resolved by IP matching — a non-obvious enrichment behavior. It stops short of noting ordering, limits, or behavior when the IP matches no known client.

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?

One sentence plus a worked example: dense but front-loaded with the resource and output shape, and every clause carries information (format, enabled flag, client resolution). The embedded sample line is the most efficient way to convey the return format in the absence of an output schema.

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?

For a single-optional-parameter, non-destructive list tool with no output schema, the description covers what an agent mainly needs: entry format plus the two extra facts it returns. Only minor gaps remain — no pagination/limit behavior and no note that site scoping applies to the result set.

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?

With only one optional parameter at 100% schema description coverage, the schema already explains the site argument (name, id or reference, optional on single-site consoles). The description adds nothing about it — not even that the listing is scoped to that site — which is the baseline-3 case where the schema carries the semantics.

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?

The description names the resource (port forwards) and, crucially, shows the exact rendered shape of each entry, so an agent knows this is a read/list of port-forward rules rather than firewall policies or networks. It never uses an explicit verb like "list" — the noun phrase leans on the tool name for that — but the resource and its scope are unambiguous.

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

Usage Guidelines2/5

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

There is no guidance on when to choose this over unifi_list_firewall or unifi_list_networks, nor any mention of prerequisites, permissions, or what happens when the console has multiple sites. The one optional parameter (site) is never referenced, so the agent gets no usage context at all beyond the resource name.

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