Skip to main content
Glama
unifi-mcp-server

unifi-mcp-server

by PainInTheNic

Get Firewall Policy Details

unifi_get_firewall_policy
Read-onlyIdempotent

Retrieves the full definition of a UniFi firewall policy by ID, including zones, matchers, protocol, action, schedule, and logging so you can inspect or verify rules.

Instructions

Get the full definition of one firewall policy by ID: source/destination zones and matchers, protocol, action, schedule, logging. IDs come from unifi_list_firewall_policies.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "policyId": "<policyId>"
    },
    "name": "unifi_get_firewall_policy"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteIdNoSite ID (UUID from unifi_list_sites). Optional — when the console has exactly one site it is used automatically.
policyIdYesFirewall policy ID (UUID from unifi_list_firewall_policies)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so safety is covered. The description adds value by disclosing the content of the returned definition (zones, matchers, protocol, action, schedule, logging), which substitutes for the absent output schema; only error behavior for an unknown ID is left unstated.

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 tight sentences: scope and returned fields first, provenance of the ID second. No filler and nothing repeated from the title.

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?

With no output schema and no nested objects, the description compensates well by listing the fields the full definition contains and pointing to the ID source. Minor gap: nothing about behavior when the policy ID is not found or belongs to another site.

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% and both parameters are UUID-documented in the schema, including the siteId fallback behavior. The description only restates that the policy is selected by ID and where IDs come from, adding little meaning beyond the schema — 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 ('Get the full definition of one firewall policy by ID') and enumerates the returned content (zones, matchers, protocol, action, schedule, logging). This clearly separates it from unifi_list_firewall_policies, which returns the collection rather than one policy's definition.

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 second sentence gives an explicit prerequisite path: 'IDs come from unifi_list_firewall_policies,' telling the agent to call the list tool first. It lacks an explicit when-not clause, but for a single-resource getter the context is clear enough.

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

Deploy Server

Other Tools