Skip to main content
Glama

Execute switch port action

unifi_net_port_action
Destructive

Triggers 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

NameRequiredDescriptionDefault
bodyNoExtra action payload; its `action` key is ignored, `action` above wins
actionYese.g. "POWER_CYCLE"
confirmNo"YES" to apply; without it the tool returns a preview.
dry_runNotrue: preview only, nothing is sent.
portIdxYes
deviceIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

C2.7/5.0
Behavior3/5

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

Annotations already flag destructiveHint=true, idempotentHint=false and openWorldHint=true, so the risk profile is covered. The description adds the useful vendor literal mapping (POWER_CYCLE, with "power-cycle" accepted as an alias), but says nothing about the confirm/preview gate or what state change the port ends up in, which is the key behavioral context for a destructive port action.

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?

Two terse fragments with no padding, so it is efficient. But the phrasing "power-cycle is mapped" is cryptic and the brevity comes at the cost of missing essentials rather than from tight editing.

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

Completeness2/5

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

This is a destructive, non-idempotent port mutation with no output schema, and the description never mentions that omitting confirm="YES" yields only a preview. For a tool that power-cycles hardware, that safety-relevant behavior should appear in prose, not be discoverable only by reading the schema.

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 coverage is 67%, and the schema itself documents confirm, dry_run, and body precedence well. The description only enriches the action parameter by naming POWER_CYCLE and its alias; deviceId and portIdx remain undocumented in both places despite being required.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Action on a switch port" is essentially the tool name restated, with the only concrete content being the POWER_CYCLE vendor literal. It does not distinguish this tool from close siblings like unifi_gen_executeportaction, unifi_net_device_action, or unifi_net_reboot_device, leaving the agent to infer that this one is port-scoped PoE control.

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

Usage Guidelines2/5

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

No when-to-use guidance, no prerequisites (e.g. that the device must be an adopted switch with a PoE port), and no pointer to alternatives. The only actionable hint is the accepted action value, which is invocation detail rather than selection guidance.

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

Deploy Server

Other Tools