Skip to main content
Glama
owine

UniFi Network MCP Server

by owine

Get device statistics

unifi_get_device_statistics
Read-only

Retrieve live device statistics to monitor UniFi device health, uptime, CPU, memory, uplink rates, and AP radio metrics.

Instructions

Get latest live statistics for a device. Returns: uptimeSec, lastHeartbeatAt, nextHeartbeatAt, loadAverage1/5/15Min, cpuUtilizationPct, memoryUtilizationPct, uplink (txRateBps, rxRateBps; absent on e.g. the ISP modem), interfaces.radios[] for APs ({frequencyGHz, txRetriesPct}; interfaces is {} for non-AP devices). NOTE: verified against 11.0.83 — the Integration API does NOT expose per-switch-port byte/error/PoE-power counters here; port-level live stats are unavailable. Use for: device health and AP radio metrics. For config (channel, power, port assignment), use unifi_get_device.

Input Schema

NameRequiredDescriptionDefault
siteIdYesSite ID
deviceIdYesDevice ID

Output Schema

NameRequiredDescriptionDefault
uplinkNo
uptimeSecNo
interfacesNo
lastHeartbeatAtNo
loadAverage1MinNo
loadAverage5MinNo
nextHeartbeatAtNo
loadAverage15MinNo
cpuUtilizationPctNo
memoryUtilizationPctNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.15.0
    • addedInput schema / properties / deviceId / pattern
      Added value: +"^[A-Za-z0-9_-]{1,64}$"
    • addedInput schema / properties / siteId / pattern
      Added value: +"^[A-Za-z0-9_-]{1,64}$"
    • changedOutput schema / additionalProperties
      Previous value: -falseNew value: +{}
  2. Addedv2.10.0
  3. Removedv2.9.0
  4. First observedv2.8.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld=false/destructive=false, so safety is covered; the description nonetheless adds real behavioral value by flagging version-verified limitations ('does NOT expose per-switch-port byte/error/PoE-power counters') and conditional field absence (uplink missing on the ISP modem, interfaces empty for non-APs). Some of the 'Returns:' enumeration overlaps the output schema, which slightly dilutes the addition.

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?

Front-loads purpose, then use cases, then the alternative — a good ordering. The long 'Returns:' field enumeration is denser than needed given an output schema exists, but it is not padded or vague.

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 two-param read tool with annotations and an output schema, the description covers purpose, routing to the sibling, conditional field behavior, and version-specific data gaps. An agent has everything needed to call and interpret it.

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 100% for both parameters (siteId, deviceId), so the schema already carries the semantics; the description adds no format, constraint, or lookup guidance beyond it. Baseline 3 applies.

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 ('Get latest live statistics for a device') and explicitly contrasts itself with the sibling unifi_get_device by scope (live stats vs. config). An agent can route between the two without opening either schema.

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?

Gives explicit use cases ('device health and AP radio metrics') and an explicit exclusion with the named alternative ('For config (channel, power, port assignment), use unifi_get_device'). Nothing is left to inference.

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