Skip to main content
Glama

unifi_traffic_report

Read-onlyIdempotent

Retrieve traffic and client counts over time for a site, AP, client, or gateway, with selectable intervals and gateway metrics such as WAN latency, CPU, and memory.

Instructions

Traffic and client counts over time from the console's own reports, for the whole site, one AP (device), one client, or the gateway (with WAN latency, CPU, memory). Interval 5minutes, hourly or daily (default by range). At most 200 points: longer series are averaged per bucket, first and last kept. Bytes are per bucket of the chosen interval.

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": {
      "scope": "<scope>"
    },
    "name": "unifi_traffic_report"
  }
}

Input Schema

NameRequiredDescriptionDefault
siteNoSite name, id or reference; optional while the console has a single site
scopeYesWhat to report on; ap needs device, client needs client
sinceNoStart of the range: an ISO 8601 timestamp (2026-10-31T08:00:00Z) or a span back from now such as 90m, 24h, 7d or 2w
untilNoEnd of the range (default now): an ISO 8601 timestamp (2026-10-31T08:00:00Z) or a span back from now such as 90m, 24h, 7d or 2w
clientNoClient name, MAC, IP or id (scope client only)
deviceNoAP name, MAC, IP or id (scope ap; must be an access point), or the gateway (scope gateway; needed when the site has several)
intervalNoBucket size; default 5minutes up to 2 days, hourly up to 31 days, else daily

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.4.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the safety profile is covered; the description instead contributes genuinely non-obvious behavior: a hard 200-point cap, averaging into buckets with first and last points preserved, unit semantics (bytes per bucket), and interval defaulting by range. It stops short of describing the shape of returned series, which matters given there is no output schema, so it is strong but not complete.

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?

Four compact sentences: what it reports, over which scopes, the interval options, then the aggregation and unit caveats. Nothing is redundant and the scope enumeration is front-loaded before the sampling behavior, which is the right order for an agent deciding whether to call it.

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

Completeness4/5

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

For a seven-parameter read-only reporting tool with full schema coverage, the description covers the essentials: what is measured, per-scope targets, time range mechanics via schema, and the aggregation/units caveat that would otherwise silently mislead. The main remaining gap is the absence of any hint about the returned series structure, which the missing output schema leaves undocumented.

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%, so the schema already documents every parameter including ISO-or-span formats and enum values; that sets the baseline at 3. The description adds some meaning beyond it, chiefly the interval default rule (5minutes up to 2 days, hourly up to 31 days, else daily) and the note that gateway scope requires/uses a device, but it repeats rather than extends the scope-to-parameter dependency already in the schema.

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?

"Traffic and client counts over time from the console's own reports" gives a specific verb+resource, and the four scopes (site, AP, client, gateway) pin down exactly what granularity is returned. This clearly distinguishes it from siblings like unifi_events or unifi_get_client, which are event- or entity-oriented rather than time-series reports.

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

Usage Guidelines3/5

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

The description implies when to use it by enumerating scopes and noting gateway scope yields WAN latency/CPU/memory, but it never explicitly says when to prefer this over unifi_events or unifi_list_clients. No exclusions or prerequisites (e.g. permissions, console report retention) are stated, so the agent must infer the choice from the scope list.

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