Skip to main content
Glama
owine

UniFi Network MCP Server

by owine

Get firewall policy

unifi_get_firewall_policy
Read-only

Retrieve a firewall policy by ID to view its match criteria, action, logging, and flow reporting settings.

Instructions

Get a firewall policy by ID with full match criteria and action. Returns the same fields as a unifi_list_firewall_policies entry, including loggingEnabled and reportFlowEnabled.

Input Schema

NameRequiredDescriptionDefault
siteIdYesSite ID
firewallPolicyIdYesFirewall policy ID

Output Schema

NameRequiredDescriptionDefault
idYes
nameNo
indexNo
actionNo
sourceNo
enabledNo
metadataNo
scheduleNo
descriptionNo
destinationNo
ipsecFilterNo
loggingEnabledNo
ipProtocolScopeNo
reportFlowEnabledNo
connectionStateFilterNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changedv2.15.0
    • addedInput schema / properties / firewallPolicyId / pattern
      Added value: +"^[A-Za-z0-9_-]{1,64}$"
    • addedInput schema / properties / siteId / pattern
      Added value: +"^[A-Za-z0-9_-]{1,64}$"
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +{}
    • addedOutput schema / properties / metadata / properties / configurable
      Added value: +{
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / reportFlowEnabled
      Added value: +{
      +  "type": "boolean"
      +}
  2. First observedv2.8.0

TDQS

B3.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, so the safety profile is covered by structured data. The description adds meaningful context by specifying that the return matches a list-policies entry and naming fields like loggingEnabled and reportFlowEnabled, but since an output schema exists this is largely confirmatory rather than new behavioral disclosure.

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 with zero waste; the core action is front-loaded and the return-shape note follows. Every clause earns its place.

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 simple two-parameter read with complete annotations and an output schema, the description is nearly sufficient. The only gap is the absence of routing guidance relative to the list sibling, which is minor given the tool's simplicity.

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% for both parameters (siteId and firewallPolicyId), so the schema already carries the meaning. The description adds nothing about parameter format or constraints beyond what the schema provides, making the baseline 3 appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 ('Get a firewall policy by ID') and scopes it further with 'full match criteria and action'. It also anchors the return shape to a named sibling (unifi_list_firewall_policies), letting an agent distinguish the single-item getter from the lister.

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

Usage Guidelines2/5

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

There is no explicit when-to-use or when-not-to-use guidance. The phrase 'by ID' implies a single-item lookup, but the description never tells the agent to use unifi_list_firewall_policies first to obtain the ID, nor when to prefer one over the other.

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