Skip to main content
Glama
UniFi Network MCP Server

UniFi Network MCP Server

by owine

Get UPnP status

unifi_get_upnp_status
Read-only

Reads whether UPnP and NAT-PMP are enabled on a site's gateway, showing if the stored setting is active and flagging controller versions where no UPnP setting exists.

Instructions

Read whether UPnP and NAT-PMP are on for the site's gateway, from the classic controller API (get/setting): the dedicated upnp section where the controller has one, otherwise the gateway (usg) section's upnp_* fields. With UPnP on, LAN devices open WAN ports themselves, without a port forward. upnp_nat_pmp_enabled is the stored setting, which does nothing while UPnP is off; detail says which applies. status: unavailable means no UPnP setting was found on this controller version; it does not mean UPnP is off.

Input Schema

NameRequiredDescriptionDefault
siteReferenceYesSite internalReference from unifi_list_sites (often default), not the Integration API UUID

Output Schema

NameRequiredDescriptionDefault
detailYes
sourceYes
statusYes
upnp_enabledYes
siteReferenceYes
upnp_secure_modeYes
upnp_wan_interfaceYes
upnp_nat_pmp_enabledYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations already declare readOnly/no-destructive, and the description goes well beyond them: it discloses the fallback resolution order (dedicated upnp section, else usg upnp_* fields), that upnp_nat_pmp_enabled is a stored value with no effect while UPnP is off, and that 'status: unavailable' means no setting was found rather than UPnP being disabled. These are exactly the interpretation traps an agent would otherwise get wrong.

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?

Content is front-loaded with the read purpose and the setting-resolution rule before the interpretive caveats. The first sentence is dense and heavily parenthetical, but nearly every clause carries operational meaning, particularly the 'unavailable' caveat that prevents a false negative reading.

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

Completeness5/5

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

The tool is simple (one required parameter) and an output schema exists, so return-value documentation is not required. The remaining complexity — which API section answers and how to read the status/detail fields — is fully covered, leaving nothing an agent would need before calling it.

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?

There is only one parameter, siteReference, and the schema already documents it at 100% coverage including the 'from unifi_list_sites, not the Integration API UUID' caveat. The description adds nothing parameter-specific, so the schema baseline of 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?

The description opens with a specific verb and resource — 'Read whether UPnP and NAT-PMP are on for the site's gateway' — and even names the API surface (classic controller, get/setting). No sibling tool covers UPnP/NAT-PMP, so the tool is unambiguously differentiated from the listed list_/get_ 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?

The narrow scope makes the use case self-evident (checking gateway UPnP/NAT-PMP state), and the explanation that UPnP lets LAN devices open WAN ports themselves distinguishes this from inspecting port forwards. There is no explicit when-not guidance or named alternative, but there is no competing sibling that would need routing.

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