Skip to main content
Glama

unifi_update_acl_rule

DestructiveIdempotent

Updates fields on a user-defined UniFi ACL rule, merging changes and previewing them unless confirm is true; refuses built-in rules and guards protected-network matches.

Instructions

Change fields of a user-defined ACL rule; the tool reads it, merges and PUTs the whole rule. Always needs confirm: true; without it the tool previews the changed fields. Rules UniFi made are refused. A rule that can match a protected network (UNIFI_MCP_PROTECTED_NETWORKS, pi-cluster by default) needs confirm: true: one naming it or an address in its subnet, a network the console does not have, or an endpoint that is open (no filter, ports only, MACs) and so matches any address.

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": {
      "aclRule": "<aclRule>"
    },
    "name": "unifi_update_acl_rule"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoRule name
siteNoSite name, id or reference; optional while the console has a single site
typeNoIPV4 (default) or MAC
actionNoWhat matched traffic gets
aclRuleYesACL rule id or exact name
confirmNoMust be true to carry out a guarded change; without it the tool only previews it
enabledNoWhether the rule is active
descriptionNoDescription
sourceFilterNoOfficial ACL endpoint: {type: NETWORKS, networkIds, portFilter?}, {type: IP_ADDRESSES_OR_SUBNETS, ipAddressesOrSubnets, portFilter?} or {type: PORTS, portFilter}; absent matches any
protocolFilterNoProtocols (absent: all)
networkIdFilterNoMAC rules: the network they apply on
destinationFilterNoOfficial ACL endpoint: {type: NETWORKS, networkIds, portFilter?}, {type: IP_ADDRESSES_OR_SUBNETS, ipAddressesOrSubnets, portFilter?} or {type: PORTS, portFilter}; absent matches any
enforcingDeviceFilterNoSwitches that enforce it (absent: all)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (destructive, non-read-only, idempotent), the description discloses the read-merge-PUT implementation, the dry-run preview path when confirm is absent, the refusal of built-in rules, and the protected-network safety check with its environment variable. This is the kind of context an agent cannot get from structured fields.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The core behavior and the confirm requirement are front-loaded in short clauses, with the more conditional protected-network detail last. The final sentence is long and stacks several conditions, but each clause carries distinct operational information rather than filler.

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 13-parameter mutation tool with nested filter objects and no output schema, the description covers the high-risk areas: confirmation, preview behavior, refusal cases, and safety guards. It leaves minor gaps around what the preview response looks like and which fields are actually merged versus replaced.

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 the schema already documents all 13 parameters including confirm and the filter objects, which sets the baseline at 3. The description does add interpretation of filter endpoints — an endpoint with no filter, ports only, or MACs matches any address — but it does not systematically clarify the individual mutable fields beyond 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?

The opening clause gives a specific verb and resource ('Change fields of a user-defined ACL rule') and immediately explains the mechanism (read, merge, PUT the whole rule), which distinguishes it from unifi_create_acl_rule and unifi_delete_acl_rule. The qualifier 'user-defined' further scopes what objects it accepts.

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?

It states clear operating conditions: confirm: true is always required, otherwise the tool previews, and rules created by UniFi are refused outright. The protected-network condition spells out exactly which rules trigger the extra guard. It stops short of naming sibling tools (create/delete) as alternatives for other intents, so it is clear context rather than full routing guidance.

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