Skip to main content
Glama
unifi-mcp-server

unifi-mcp-server

by PainInTheNic

Enable/Disable Firewall Policy

unifi_set_firewall_policy_enabled
DestructiveIdempotent

Enable or disable an existing user-defined firewall policy to control live traffic filtering. System and predefined policies cannot be modified.

Instructions

Enable or disable an existing user-defined firewall policy (system/predefined policies cannot be modified). This changes live traffic filtering — confirm with the user before toggling a policy, and double-check WHICH policy with unifi_get_firewall_policy first.

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>",
      "enabled": "<enabled>"
    },
    "name": "unifi_set_firewall_policy_enabled"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteIdNoSite ID (UUID from unifi_list_sites). Optional — when the console has exactly one site it is used automatically.
enabledYestrue to enable the policy, false to disable it
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 flag destructiveHint=true, idempotentHint=true and readOnlyHint=false, so safety semantics are covered. The description adds genuinely new behavior: the operation alters live traffic filtering and is rejected/limited for system and predefined policies — context the annotations cannot express. It does not say what happens on an invalid or predefined policyId (error vs silent no-op) or what the call returns.

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 scope restriction stated before the action and the prerequisite/confirmation guidance following it. Everything is front-loaded and actionable.

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 destructive mutation with no output schema, the description covers risk, the prerequisite lookup, and the policy-type restriction — enough to call it correctly and safely. The only gap is post-call behavior: whether the toggle is immediately effective and what the response contains.

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%, so all three parameters are already documented, establishing a baseline of 3. The description adds one real constraint beyond the schema — that policyId must reference a user-defined policy — but says nothing further about enabled or siteId behavior.

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 pair (enable/disable) and resource (user-defined firewall policy), and immediately scopes it by excluding system/predefined policies. An agent can distinguish this from unifi_update_firewall_policy or unifi_delete_firewall_policy without opening those schemas.

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?

Gives explicit preconditions: confirm with the user before toggling, and verify WHICH policy via unifi_get_firewall_policy first. It implicitly rules out system/predefined policies. It stops short of naming the sibling to use for actual policy edits (update) or removal (delete), so the alternative space is only partially mapped.

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