Skip to main content
Glama

get_device_port_state

Retrieve switch port health, PoE, optics, and LLDP telemetry for a device. Query a single port or all ports to diagnose connectivity issues.

Instructions

Get switch port health, PoE, optics, and LLDP telemetry for a device.

Read-only and Fabric-only: reuses the same Classic REST /v1/connector/consoles/{host_id}/proxy/network/api/s/{site_slug}/stat/device request as list_device_stats (one call, no new route), then projects the selected device's port telemetry from that payload. Upstream operational fields are preserved verbatim — link state/speed/duplex, rx/tx byte/packet/error/drop counters, PoE state and draw (poe_enable/poe_good/poe_power/poe_voltage/poe_current/poe_class/poe_mode), SFP/optics fields where present, and port config identity — nothing is renamed or dropped.

host: console name, ID, or composite ID (MAC:numericId format). site: site name or ID. device_id: device selector — its /stat/device _id, id, or mac (case- and separator-insensitive). port_idx: optional 1-based port number. Omit it for the device view (verbatim port_table and lldp_table plus a thermal/power summary); set it to return that single port_table row verbatim. An unknown port_idx fails clearly.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
hostYes
siteYes
port_idxNo
device_idYes
Install Server

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations provided, the description carries the full burden, and it delivers: it declares read-only behavior, explains data provenance (one call, no new route), states fields are preserved verbatim and nothing is renamed or dropped, and describes the optional port_idx behavior and failure mode. This is exemplary transparency for a data-access tool.

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?

The description is dense but every sentence adds operational value: purpose, constraints, provenance, preserved fields, parameter semantics, and edge-case behavior. It is front-loaded with the key purpose and avoids redundant restatement of the tool name.

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?

For a tool with no output schema, no annotations, and 0% schema coverage, the description is remarkably complete. It tells the agent what data to expect, how to select devices, how to switch views, and what happens on an invalid port index. Nothing critical is missing for correct invocation.

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%, so the description must compensate, and it does thoroughly. It explains host formats (console name, ID, or composite ID), site name/ID, device_id selector variants (_id, id, mac) with case/separator insensitivity, and port_idx as an optional 1-based number with distinct behaviors for omitted vs. set values.

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 opens with a specific verb and resource: 'Get switch port health, PoE, optics, and LLDP telemetry for a device.' It clearly distinguishes itself from the sibling list_device_stats by stating it reuses the same request but projects the selected device's port telemetry, so an agent can tell them apart.

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?

The description gives clear context: it is Read-only and Fabric-only, and it reuses the same Classic REST request as list_device_stats. It explains when to omit or set port_idx, but it does not explicitly state 'use this instead of X when y condition,' though the reference to list_device_stats implies the differentiation.

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