Skip to main content
Glama
unifi-mcp-server

unifi-mcp-server

by PainInTheNic

Get Firewall Policy Ordering

unifi_get_firewall_policy_ordering
Read-onlyIdempotent

Retrieve the current evaluation order for user-defined firewall policies between a source and destination zone, showing policy IDs that run before and after system-defined policies before reordering.

Instructions

Get the current evaluation order of user-defined firewall policies for one source→destination zone pair — the policy IDs split into those evaluated before and after the system-defined policies. Use this before unifi_reorder_firewall_policies. Zone IDs come from unifi_list_firewall_zones.

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": {
      "sourceFirewallZoneId": "<sourceFirewallZoneId>",
      "destinationFirewallZoneId": "<destinationFirewallZoneId>"
    },
    "name": "unifi_get_firewall_policy_ordering"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteIdNoSite ID (UUID from unifi_list_sites). Optional — when the console has exactly one site it is used automatically.
sourceFirewallZoneIdYesSource firewall zone ID (from unifi_list_firewall_zones)
destinationFirewallZoneIdYesDestination firewall zone ID (from unifi_list_firewall_zones)

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 the description need not restate safety. It adds real context beyond them: the result is partitioned into policies evaluated before vs. after system-defined policies, and the query is scoped to a single zone pair rather than the whole policy set.

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, front-loaded with the scope and output shape, followed by workflow and prerequisite pointers. No filler or redundant phrasing.

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, the description carries the burden of describing the return value and does so adequately by explaining the before/after system-policy split. The optional siteId auto-selection behavior is documented in the schema rather than the description, which is acceptable for a simple read tool.

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 coverage is 100% and the schema descriptions already note that zone IDs come from unifi_list_firewall_zones, so the description's repetition of that pointer adds little. It does reinforce that the two zone parameters jointly define the ordering context, which is a minor semantic addition over 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 ('Get') and a precisely scoped resource: the current evaluation order of user-defined firewall policies for one source→destination zone pair. It also clarifies the return shape (policy IDs split into those evaluated before and after system-defined policies), which distinguishes it from sibling tools like unifi_list_firewall_policies and unifi_reorder_firewall_policies.

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?

Explicitly places the tool in a workflow ('Use this before unifi_reorder_firewall_policies') and names the prerequisite for zone IDs (unifi_list_firewall_zones). It does not state when not to use it or how it differs from listing all policies, but the sequencing guidance is clear and actionable.

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