Execute switch port action
unifi_net_port_actionTriggers actions on a UniFi switch port, such as power-cycling PoE devices. Supports preview-only dry runs and requires confirmation to apply changes.
Instructions
Action on a switch port. Vendor value: POWER_CYCLE (PoE power-cycle; "power-cycle" is mapped).
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": {
"deviceId": "<deviceId>",
"portIdx": "<portIdx>",
"action": "<action>"
},
"name": "unifi_net_port_action"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| body | No | Extra action payload; its `action` key is ignored, `action` above wins | |
| action | Yes | e.g. "POWER_CYCLE" | |
| confirm | No | "YES" to apply; without it the tool returns a preview. | |
| dry_run | No | true: preview only, nothing is sent. | |
| portIdx | Yes | ||
| deviceId | Yes |