Skip to main content
Glama
unifi-mcp-server

unifi-mcp-server

by PainInTheNic

Delete Firewall Policy

unifi_delete_firewall_policy
DestructiveIdempotent

Deletes a user-defined UniFi firewall policy by policy ID; use it to remove obsolete rules after verifying the policy and confirming the irreversible traffic-filtering change.

Instructions

Delete a user-defined firewall policy. CAUTION: irreversible and changes live traffic filtering — confirm with the user and verify the policy with unifi_get_firewall_policy first. System-defined policies cannot be deleted. 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_delete_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.5/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true, and readOnlyHint=false, so the safety profile is covered structurally. The description adds genuinely new context: the operation is irreversible and it changes live traffic filtering immediately, plus a user-confirmation requirement. It stops short of describing failure behavior (e.g., what happens for a nonexistent or system policy ID), which keeps it below a 5.

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?

Three short sentences, front-loaded with the action, then the caution, then the constraint and ID provenance. Every clause carries operational weight with no restatement of the title or schema.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a two-parameter destructive tool with rich annotations and no output schema, the description covers impact, irreversibility, pre-verification, ID sourcing, and a hard constraint on system policies. Nothing an agent needs before invoking it is missing.

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%, with both policyId and siteId documented in the schema including their source tools and the single-site default. The description only reinforces the policyId provenance ("IDs come from unifi_list_firewall_policies") and says nothing about siteId, so it adds little beyond the schema baseline of 3.

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 ("Delete a user-defined firewall policy") and immediately narrows scope by excluding system-defined policies, which is the key distinction an agent needs. It is unambiguous against siblings such as unifi_update_firewall_policy or unifi_set_firewall_policy_enabled.

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

Usage Guidelines5/5

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

Explicitly names the prerequisite verification step (unifi_get_firewall_policy), the source of IDs (unifi_list_firewall_policies), and the exclusion condition (system-defined policies cannot be deleted). It also instructs the agent to confirm with the user before acting, leaving no when-to-use inference.

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