Skip to main content
Glama

List firewall rules (legacy)

unifi_list_firewall_rules
Read-only

Lists classic UniFi firewall rules by ruleset and index with action, protocol, source, and destination. Use for legacy networks; on Network 11+ or zone-based sites, list firewall policies instead.

Instructions

List classic firewall rules, sorted by ruleset (WAN_IN, LAN_IN, ...) and rule_index, with action, protocol, source and destination. Not available on Network 11+ or on sites migrated to the zone-based firewall (Network 9+): use unifi_list_firewall_policies there.

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_firewall_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.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, openWorldHint=false, so the safety profile is covered. The description adds genuinely non-obvious behavior: default sort order (by ruleset then rule_index), the fields returned per item, and a version/migration availability gate that would otherwise cause silent empty results. It does not mention result limits or pagination, which keeps it short of a 5.

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, both front-loaded with the highest-value information: what it lists and the sort order first, then the availability caveat with the alternative. No filler, no restatement of the title or annotations.

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 zero-required-parameter list tool with no output schema, the description covers what items contain, their ordering, and the platform constraint that determines whether it works at all. Remaining gaps (paging, behavior on large result sets) are minor and partly mitigated by the schema's note that raw returns large controller objects.

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%, with raw, site, fields, and search all documented in the schema itself (including the size warning on raw and the pointer to unifi_list_sites). The description adds no parameter-level meaning, so the 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 classic firewall rules') and immediately scopes it as the legacy ruleset model, distinguishing it from the newer policy object. The parenthetical ruleset examples (WAN_IN, LAN_IN) and the named return fields make the output unambiguous.

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 states when this tool is NOT usable ('Not available on Network 11+ or on sites migrated to the zone-based firewall (Network 9+)') and names the exact alternative to use instead ('unifi_list_firewall_policies'). An agent can route correctly without inspecting any sibling schema.

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