Skip to main content
Glama
unifi-mcp-server

unifi-mcp-server

by PainInTheNic

Create ACL Rule

unifi_create_acl_rule
Destructive

Create a UniFi layer-2/switch ACL rule to allow or block traffic by defining action, filters, and enforcing devices; confirm changes before applying.

Instructions

Create a layer-2/switch ACL rule. 'config' requires action (ALLOW/BLOCK), enabled, name, type; plus sourceFilter/destinationFilter/enforcingDeviceFilter as needed. Model it on an existing rule fetched via unifi_get_acl_rule. CAUTION: changes switching-level access; confirm with the user.

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": {
      "config": "<config>"
    },
    "name": "unifi_create_acl_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
configYesFull ACL rule object. Required: action, enabled, name, type. See unifi_get_acl_rule for the filter shapes. A config with any value still containing "[redacted]" (how reads show credentials) is refused: put the real value in, or leave the field out.
siteIdNoSite ID (UUID from unifi_list_sites). Optional — when the console has exactly one site it is used automatically.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.2/5.0
Behavior3/5

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

Annotations already declare destructive=true, idempotent=false and openWorld=true, so the safety profile is baseline. The description usefully adds that this alters switching-level access and should be user-confirmed, but it does not say whether the rule is evaluated immediately or where it lands in the ACL order — a meaningful gap for an ACL tool. The redaction-refusal behavior is disclosed in the schema rather than here.

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 purpose, then payload contract, then the one-line caution. Nothing redundant.

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 nested-object mutation with no output schema, the definition covers the required fields, where to source the filter shapes, and the risk posture. Minor gaps remain around ordering/evaluation effects and confirmation of what a successful create returns, but the schema carries siteId and routing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline is 3; the description earns more by naming the optional filter keys (sourceFilter/destinationFilter/enforcingDeviceFilter) that the schema leaves as free-form additionalProperties, and by pointing to unifi_get_acl_rule for their shapes. It also surfaces the ALLOW/BLOCK values even though no enum is declared in 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 and resource ("Create a layer-2/switch ACL rule") and scopes it to switching-level rules, which separates it from firewall-policy and other create siblings without needing the schema.

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 concrete guidance: model the payload on an existing rule fetched via unifi_get_acl_rule, and confirm with the user before applying. It does not contrast against unifi_create_firewall_policy or say when an ACL rule is the wrong choice, so it stops short of full routing guidance.

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