Preview UniFi Configuration Change
unifi_preview_changePreview 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
| Name | Required | Description | Default |
|---|---|---|---|
| params | No | ||
| changes | No | ||
| operation | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | ||
| diff | Yes | ||
| kind | Yes | ||
| impact | No | ||
| method | Yes | ||
| target | Yes | ||
| current | No | ||
| approval | Yes | ||
| changeId | Yes | ||
| rollback | No | ||
| operationId | Yes | ||
| approvalExpiresInSeconds | Yes |