Skip to main content
Glama

List port forwards

unifi_list_port_forwards
Read-only

Lists UniFi port forwarding rules so you can audit WAN-to-internal IP and port mappings, protocols, WAN interfaces, allowed sources, and logging.

Instructions

List port forwards (WAN port to internal IP and port) with protocol, WAN interface, allowed source and logging. Custom DNAT/SNAT rules are in unifi_list_nat_rules, and the rules that filter traffic in unifi_list_firewall_policies (unifi_list_firewall_rules on classic firewalls).

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 as used in the API (e.g. 'default'). Defaults to the configured site. See unifi_list_sites.
fieldsNoOnly return these fields per item (dot paths, e.g. uplink.name)
searchNoCase-insensitive substring match on names, MACs, IPs and similar

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv0.9.1
    • addedInput schema / properties / fields / description
      Added value: +"Only return these fields per item (dot paths, e.g. uplink.name)"
    • addedInput schema / properties / search / description
      Added value: +"Case-insensitive substring match on names, MACs, IPs and similar"
  2. First observedv0.8.1

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false and idempotentHint=false, so the safety profile is covered. The description's added value is the enumeration of returned attributes, which matters because there is no output schema, but it says nothing about pagination, result volume, or required privileges. Useful context, though not rich behavioral disclosure.

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?

Two sentences, zero filler: the resource and its content come first, then the disambiguation routing. The parenthetical about classic firewalls is the only extra and it earns its place by preventing a wrong sibling choice.

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 three-optional-parameter list tool with annotations and no output schema, the definition covers purpose, returned fields and sibling routing adequately. Minor gaps remain around pagination and result limits, which an agent may care about on large rule sets.

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 description coverage is 100%, so site, fields and search are fully documented in the schema itself. The description adds no syntax or semantics beyond that (no mention of the dot-path form, site defaults, or search scope), which is acceptable given the schema does the work.

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 ("List port forwards") and immediately defines the domain ("WAN port to internal IP and port") plus the attributes returned (protocol, WAN interface, allowed source, logging). It also names the sibling tools holding adjacent rule types, so an agent can distinguish it from unifi_list_nat_rules and unifi_list_firewall_policies without opening any schema.

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 routes the agent: custom DNAT/SNAT rules belong in unifi_list_nat_rules, and traffic-filtering rules in unifi_list_firewall_policies (with the classic-firewall variant unifi_list_firewall_rules called out). That is clear positive routing, but there is no stated when-not condition (e.g. permissions required, or that port forwards are a subset view of NAT) beyond the type split.

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