Skip to main content
Glama

execute_port_action

Power-cycle a PoE port on a UniFi switch to restore a stuck device. Provide host, site, device ID, and port index to restart power via the UniFi Fabric API.

Instructions

Execute a port action on a device interface.

OPERATIONAL-ACTION-ONLY, NOT A CONFIG WRITER: this Integration port-actions endpoint performs a transient operational action; it does NOT persist port configuration. A PoE power cycle ({'action': 'power-cycle'}, canonical id POWER_CYCLE) is the only valid action -- it powers a PoE port off and back on (only meaningful on PoE-capable ports). Config-style actions such as {'action': 'set-poe-mode', ...} are rejected by the controller with HTTP 400 'unknown-type-id' and leave the port unchanged (verified live). Do NOT use this to set PoE mode, STP, VLAN, or any persistent port setting -- there is no confirmed per-port persistent-config writer on this API; a shared Ethernet Port Profile (update_port_profile) is a different, wide-blast-radius surface.

host: console name, ID, or composite ID (MAC:numericId format). site: site name or ID. port_idx: port index number (1-based, matching the switch's physical port numbering). action: the port-action payload, shape {'action': str}, forwarded verbatim to the UniFi Network Integration API port-actions endpoint. 'power-cycle' (POWER_CYCLE) is the one valid, documented action; other values return HTTP 400 'unknown-type-id' from the controller. device_id: REQUIRED. Obtain it from list_devices (its id field).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
siteYes
actionYes
port_idxYes
device_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Install Server

TDQS

A4.9/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the transient/non-persistent nature, the exact behavior of the only valid action, HTTP 400 responses for invalid actions, and that the port remains unchanged. It also flags PoE-capability as a prerequisite.

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 description is long but front-loaded with the critical operational-vs-config warning and organized into an overview followed by parameter details. The valid-action and HTTP-400 details are repeated, but the redundancy reinforces the most important constraint rather than becoming noise.

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

Completeness5/5

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

Given the absence of annotations and a minimal schema, the description provides everything needed for a correct call: the only valid action, invalid-action behavior, device_id source, and warnings against persistent config use. With an output schema present, return-value documentation is not required.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description compensates fully by documenting all five parameters: host formats, site, 1-based port_idx, the exact action payload shape, and the required device_id with its source. No parameter is left unexplained.

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 description states a specific operation, 'Execute a port action on a device interface', and immediately distinguishes it as operational-only, not a config writer. It also names the only valid action, power-cycle, and contrasts with update_port_profile, making sibling differentiation clear.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It explicitly says when to use the tool: PoE power cycle is the only valid action. It also lists when not to use it (set-poe-mode, STP, VLAN) and points to update_port_profile as a different, broad-blast-radius alternative. device_id provenance from list_devices is also given.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/swkstudios/unifi-fabric-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server