Skip to main content
Glama

Preview UniFi Configuration Change

unifi_preview_change
Read-only

Preview a planned UniFi Network API write before applying it, returning the target, current state, exact body, diff, impact, and rollback details for review.

Instructions

Plans one documented Network API write without applying it. For updates, pass only the fields to change in changes; the broker merges them into the current record. Returns the target, current state, exact body, diff, impact, and rollback. The broker gives the owner a one-time approval code through sudo … pending; ask the owner for it. Credential fields cannot be set. Internal (unofficial) writes use the same flow: renameClient (params.id; changes { name }); setClientNote (params.id; changes { note } (empty clears it)); setClientFixedIp (params.id; changes { use_fixedip, fixed_ip, network_id } (fixed_ip and network_id when reserving)); renameDevice (params.id; changes { name }); setDeviceLed (params.id; changes { led_override: "default" | "on" | "off" }); setDeviceRadio (params.id; changes { radio (e.g. "ng" 2.4 GHz, "na" 5 GHz), and any of channel ("auto" or a number), ht (width: 20, 40, 80, 160, 320), tx_power_mode (auto, high, medium, low, custom), tx_power (dBm) }); locateDevice (params.mac; changes { enabled }); blockClient (params.mac; changes none); unblockClient (params.mac; changes none); reconnectClient (params.mac; changes none); forgetClient (params.mac; changes none); upgradeDevice (params.mac; changes none). Their IDs come from unifi_internal_read knownClients or devices.

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": {
      "operation": "<operation>"
    },
    "name": "unifi_preview_change"
  }
}

Input Schema

NameRequiredDescriptionDefault
paramsNo
changesNo
operationYes

Output Schema

NameRequiredDescriptionDefault
bodyNo
diffYes
kindYes
impactNo
methodYes
targetYes
currentNo
approvalYes
changeIdYes
rollbackNo
operationIdYes
approvalExpiresInSecondsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.9/5.0
Behavior4/5

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

Annotations only declare readOnlyHint and openWorldHint, so the description carries the real behavioral load and does so well: merge-into-current-record semantics for updates, an owner approval-code handshake, a credential-field prohibition, and an enumerated return payload of target, current state, body, diff, impact and rollback. One ambiguity remains — whether calling the tool itself creates the pending `sudo … pending` approval — which matters given readOnlyHint=true.

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

Conciseness3/5

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

The lead sentences are well front-loaded, but the internal-operation catalog is a single dense semicolon-chained sentence that is hard to scan, and structural markers (lists, grouping of documented vs. internal operations) are absent. The content is largely justified by the 0% schema coverage, but the presentation costs readability.

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

Completeness3/5

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

An output schema exists, so return values need not be explained, and the approval and credential constraints are covered. However, for a tool exposing 44 enum operations with zero schema parameter documentation, leaving the documented-API operations entirely unspecified is a material completeness gap relative to the tool's complexity.

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 0%, so the description must compensate. It does supply per-operation field contracts for the fourteen internal writes and shows params.id / params.mac usage, but the roughly two dozen documented Network API operations in the enum (updateNetwork, createFirewallPolicy, adoptDevice, executePortAction, etc.) get no parameter guidance, and `params` for official operations is left opaque.

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 sentence names a specific verb and resource — 'Plans one documented Network API write without applying it' — and its scope ('one', 'without applying it') separates it from an apply tool. An agent can tell what it produces (a plan, not a mutation) without opening 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?

It gives concrete operational guidance: pass only changed fields for updates, ask the owner for the one-time approval code, and credential fields cannot be set. It also routes internal-write IDs to unifi_internal_read knownClients/devices. It does not explicitly name unifi_apply_change or unifi_preview_batch as the next step or the alternative for multi-change batching, leaving that inference to the agent.

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