Skip to main content
Glama

List NAT rules

unifi_list_nat_rules
Read-only

List NAT rules (DNAT, SNAT, masquerade) with type, interfaces, translated IP and port, source and destination. Requires Network 9.0+ with a UniFi gateway and zone-based firewall.

Instructions

List NAT rules (DNAT, SNAT and masquerade, the predefined ones included) with type, interfaces, translated IP and port, source and destination. Needs Network 9.0+ with a UniFi gateway and the zone-based firewall. Simple port forwards are separate: unifi_list_port_forwards.

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_nat_rules"
  }
}

Input Schema

NameRequiredDescriptionDefault
rawNoReturn the full controller objects (large)
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.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuinely useful behavior beyond that: version and hardware prerequisites that determine whether the call will succeed at all, plus the fact that the list includes predefined rules. It does not discuss pagination or failure behavior on unsupported controllers.

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 dense sentences: the first defines what is returned, the second carries prerequisites and the sibling exclusion. No filler, no restatement of the title, and the highest-value disambiguation is present without padding.

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?

There is no output schema, so the description carries the burden of telling the agent what comes back — and it does, naming type, interfaces, translated IP/port, and source/destination. Combined with prerequisites and the sibling pointer, an agent has enough to call this correctly; only operational details like paging or error modes are absent.

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 all four parameters (raw, site, fields, search) are already documented in the schema; the description does not need to compensate. It adds no parameter-level meaning of its own — the field list it mentions describes output, not inputs. Baseline 3 applies.

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 NAT rules") and then pins down scope by enumerating the rule subtypes covered — DNAT, SNAT, masquerade, including predefined ones — plus the fields returned. It explicitly separates itself from the nearest sibling ("Simple port forwards are separate: unifi_list_port_forwards"), so an agent can choose it without opening a 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?

Gives a clear exclusion (port forwards belong to unifi_list_port_forwards) and states environmental preconditions: Network 9.0+, a UniFi gateway, and zone-based firewall enabled. What is missing is a positive when-to-use cue (e.g. "use when auditing address translation") and any statement about what happens on older controllers, but context is strong.

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