Skip to main content
Glama

get_device_ports

Read-only

Lists switch or gateway ports with link, speed, VLAN, PoE, and peer details. Use it to find port index and current settings before changing a port.

Instructions

List the switch/gateway ports on a device with link and VLAN details.

Read-only operation: returns each port's index, name, media (GE/SFP), link state, speed, native network (VLAN) ID, PoE mode, forward setting, and the last connected peer MAC/IP where known. Use this to find the port_idx and current values before calling set_device_port.

Args: mac: Device MAC address (case-insensitive; aa:bb:cc:dd:ee:ff or aabbccddeeff). site: Site to operate on. Defaults to "default". device: Optional device name to target a specific console; omit for default.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
macYesDevice MAC address (case-insensitive; aa:bb:cc:dd:ee:ff or aabbccddeeff).
siteNoSite to operate on. Defaults to "default".default
deviceNoOptional device name to target a specific console; omit for default.
Install Server

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already set readOnlyHint=true, and the description reinforces it with 'Read-only operation.' It adds transparency by listing exactly what is returned (media, link state, speed, native VLAN ID, PoE mode, peer MAC/IP) and notes the 'where known' caveat on peer data. No destructive or hidden behavior is possible.

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 narrative portion is tight and front-loaded, but the Args block duplicates the schema's parameter descriptions nearly verbatim. This is a minor redundancy since the input schema already documents mac, site, and device.

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?

There is no output schema, so the description compensates by listing all returned port attributes and the 'where known' caveat. It also covers the mac format, site default, and optional device target, making the tool callable without external documentation.

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 description coverage is 100%, and the Args section simply repeats the schema's parameter descriptions without adding new semantic detail. The baseline of 3 applies because the schema already carries the explanatory burden.

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 first sentence states a specific verb and resource: 'List the switch/gateway ports on a device with link and VLAN details.' It enumerates the returned fields, which separates it from sibling read tools like get_device_details and explicitly links it to set_device_port.

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?

The description explicitly prescribes when to use it: 'Use this to find the port_idx and current values before calling set_device_port.' This is a concrete workflow instruction, and the read-only label tells the agent it is safe for retrieval.

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/mikeholownych/unifi-mcp'

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