Skip to main content
Glama

List firewall policies (zone-based)

unifi_list_firewall_policies
Read-only

List zone-based UniFi firewall policies with their action, zones, protocol, schedule and logging settings. Filter by search term or include system policies to audit what traffic is allowed or blocked.

Instructions

List zone-based firewall policies (Network 9.0+) sorted by index: action, source and destination (zone and match), protocol, connection states, schedule and logging. Predefined (system) policies are left out unless include_predefined. On classic firewalls use unifi_list_firewall_rules; to find the policy that applies to a connection use unifi_check_firewall_path.

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

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
include_predefinedNoAlso return predefined/system policies

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.7/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 the safety profile is covered; the description adds real value on top by disclosing the default exclusion of predefined/system policies, the index sort order, the version gate, and the per-item fields returned. It does not address pagination, result-size limits, or error behavior on unsupported controller versions, 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?

Three dense sentences with no filler: capability and version first, default filtering second, sibling routing last. Front-loading the primary verb and resource lets an agent decide within the first clause.

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?

All five parameters are optional and fully documented, there is no output schema, and the description still characterizes the returned content and default filtering. For a read-only list tool with complete schema coverage, nothing essential to correct invocation is missing.

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%, so the baseline is 3; the description earns above baseline by stating the default behavior of include_predefined (predefined policies omitted unless set) and by enumerating the fields returned, which clarifies what the raw/fields parameters would expose. It adds no syntax detail for search or site, but those are already well documented in the schema.

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 zone-based firewall policies") plus a version qualifier (Network 9.0+) that scopes applicability. It also names the two sibling tools that cover adjacent tasks (unifi_list_firewall_rules for classic firewalls, unifi_check_firewall_path for path lookup), so an agent can distinguish it without opening schemas.

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 routes the agent: use unifi_list_firewall_rules on classic firewalls, and use unifi_check_firewall_path to find the policy applying to a connection. That is a clear when-to-use-this vs when-to-use-an-alternative statement, not implied guidance.

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