Skip to main content
Glama

List UniFi Firewall Policies

unifi_list_firewall_policies
Read-only

List UniFi gateway firewall policies in enforced order, showing action, source/destination zones, resolved network selectors, IP version, and logging; optionally filter to user-defined policies only.

Instructions

Lists firewall policies in gateway order with action, source and destination zones and network selectors (resolved to names), IP version, and logging. Optionally only user-defined policies.

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
userDefinedOnlyNo

Output Schema

NameRequiredDescriptionDefault
countYes
policiesYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare this a safe read-only, non-open-world operation, so the safety profile is covered. The description adds genuinely non-obvious behavior beyond the annotations: results are returned in gateway order (evaluation order) and network selectors are resolved to human-readable names rather than IDs, both of which affect how the agent should interpret the output.

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, zero filler, with the output scope front-loaded before the optional filtering behavior. Every clause conveys a distinct, useful fact.

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?

An output schema exists, so return structure needn't be spelled out, and the description covers scope, ordering, name resolution, and the single optional parameter. Minor gaps remain: it doesn't state whether predefined policies are included by default or whether results are paginated, though the tool's simplicity limits the impact.

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 description coverage is 0%, so the description must carry the meaning of userDefinedOnly, and it does: the flag restricts results to user-defined policies only, implying predefined/default policies are included otherwise. The default (false → include all) is inferable but not stated outright.

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 ('Lists firewall policies') and then enumerates exactly what each entry contains: action, source/destination zones, network selectors resolved to names, IP version, and logging. No sibling tool in the list covers firewall policies, so confusion with unifi_list_clients/devices/networks is not a risk.

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

Usage Guidelines3/5

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

Usage is only implied: 'Optionally only user-defined policies' tells the agent the flag exists and what it does, which is a de facto when-to-use cue for that one option. There is no statement of prerequisites, when not to call it, or how it relates to any other tool, though no obvious alternative exists in the sibling set.

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