Skip to main content
Glama
UniFi Network MCP Server

UniFi Network MCP Server

by owine

List legacy firewall rules

unifi_list_legacy_firewall_rules
Read-only

List all legacy firewall rules from the classic controller API for a specified site. View comprehensive WAN_IN, LAN_IN, and GUEST_LOCAL rulesets, including the full unpaged list.

Instructions

List the site's legacy firewall rules (WAN_IN, LAN_IN, GUEST_LOCAL and the other rulesets) from the classic controller API (rest/firewallrule), whole and unpaged. On a site that uses the zone-based firewall these rules may not be enforced; its rules are the policies unifi_list_firewall_policies returns. IDs are the classic controller's _id values, which differ from Integration API IDs: do not pass one to an Integration API tool, or the reverse. Rules reference networks by unifi_list_classic_networks IDs and groups by unifi_list_firewall_groups IDs. Sorted by ruleset, then rule_index, the order they are evaluated in.

Input Schema

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

Output Schema

NameRequiredDescriptionDefault
dataYes
countYes
siteReferenceYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv3.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, so safety is covered. The description adds non-obvious context beyond that: the rules are returned whole and unpaged, they may be unenforced on zone-based sites, IDs are classic _id values incompatible with the Integration API, and the sort order is ruleset then rule_index.

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?

Four dense sentences, front-loaded with what is listed and where from, then the enforcement caveat, ID caveat, references, and ordering. Slightly dense but every sentence carries distinct operational value with no repetition.

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?

An output schema exists, so return shape needn't be explained, yet the description still supplies the caveats an agent needs to use the results correctly: enforcement ambiguity, ID namespace boundaries, reference lookups, and evaluation order.

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 100% and the siteReference description already explains it is the internalReference from unifi_list_sites, so baseline 3 applies. The description adds cross-reference meaning to the returned data (network refs via unifi_list_classic_networks, group refs via unifi_list_firewall_groups), nudging it above baseline.

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 legacy firewall rules) and identifies the exact source (rest/firewallrule, classic controller API) plus the rulesets covered. It distinguishes itself from the zone-based sibling unifi_list_firewall_policies by name.

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

Usage Guidelines5/5

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

Explicitly warns that on zone-based firewall sites these legacy rules may not be enforced and routes the agent to unifi_list_firewall_policies for the policies that do apply. It also gives an ID-interchange exclusion: do not pass classic _id values to Integration API tools or vice versa.

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