Skip to main content
Glama

unifi_power_cycle_port

Destructive

Power-cycle PoE on a UniFi switch port to reset a connected device. Previews the change unless confirm is true, protecting gateway and protected-network ports.

Instructions

Power-cycle PoE on one switch port (official POWER_CYCLE). Needs confirm: true when the port is on the gateway, or feeds a protected-network client (pi-cluster by default) directly or through another switch or AP; without it the tool previews.

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": {
      "device": "<device>",
      "port": "<port>"
    },
    "name": "unifi_power_cycle_port"
  }
}

Input Schema

NameRequiredDescriptionDefault
portYesPort number (portIdx) on the device
siteNoSite name, id or reference; optional while the console has a single site
deviceYesDevice name, MAC, IP or id
confirmNoMust be true to carry out a guarded change; without it the tool only previews it

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already flag destructiveHint=true, readOnlyHint=false and non-idempotent, and the description goes further by disclosing the dry-run/preview behavior and the set of guarded targets that trigger confirmation. It stops short of stating expected downtime or whether the cycle is recoverable, which would complete the blast-radius picture for a destructive action.

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?

A single dense sentence that front-loads the action, then the guard condition, then the fallback behavior — no filler. Every clause (official POWER_CYCLE, protected-network, preview fallback) carries operational meaning.

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 destructive, non-idempotent mutation with full schema coverage and no output schema, the definition covers the action, the confirmation gate and the preview fallback. The main remaining gap is impact information — how long the port stays powered down and what it affects beyond the protected-network rule.

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 all four parameters are already documented, but the description adds the reasoning behind 'confirm' that the schema only asserts: which port classes make it mandatory and what happens without it (preview). It also explains the 'pi-cluster by default' protected-network notion, which the schema never mentions.

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 ('Power-cycle PoE on one switch port') and pins the exact upstream operation ('official POWER_CYCLE'), so the agent knows precisely which action fires. No sibling in the list performs port-level power cycling, so confusion risk is low.

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 an explicit gating condition: confirm: true is required when the port is on the gateway or feeds a protected-network client, directly or via another switch or AP, and otherwise the tool only previews. That is clear when-to-pass-confirm guidance, though no alternative tool is named for cases where the agent should not proceed at all.

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