Skip to main content
Glama

query_observation_trends

Read-only

Retrieve evenly spaced trend buckets for UniFi observation metrics over a UTC time range. Returns explicit gaps for missing intervals, distinguishing absence from zero.

Instructions

Query bounded UTC trend buckets for an observation kind and metric.

Read-only operation. Returns evenly spaced time buckets between start and end with explicit gaps for missing intervals, so callers can distinguish absence from zero. Bucket size defaults to 300 seconds. Use capture_observations_now first if recent data is missing.

Args: kind: Observation category to query (e.g. "health", "client", "device"). metric: Metric name within the kind (e.g. "latency_ms", "cpu_pct"). start: Inclusive UTC start timestamp (ISO-8601). end: Inclusive UTC end timestamp (ISO-8601). bucket_seconds: Width of each trend bucket in seconds. Defaults to 300. source: Optional source filter (e.g. controller type); omit for all sources. controller: Optional controller identifier filter; omit for all controllers. site: Optional site name filter (e.g. "default"); omit for all sites.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
endYesInclusive UTC end timestamp (ISO-8601).
kindYesObservation category to query (e.g. "health", "client", "device").
siteNoOptional site name filter (e.g. "default"); omit for all sites.
startYesInclusive UTC start timestamp (ISO-8601).
metricYesMetric name within the kind (e.g. "latency_ms", "cpu_pct").
sourceNoOptional source filter (e.g. controller type); omit for all sources.
controllerNoOptional controller identifier filter; omit for all controllers.
bucket_secondsNoWidth of each trend bucket in seconds. Defaults to 300.
Install Server

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses important behavior: evenly spaced buckets, explicit gaps for missing intervals so absence is distinguishable from zero, inclusive UTC timestamps, and a default bucket size. This is valuable context for interpreting results.

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 opening sentences are tight and front-loaded with purpose, behavior, and usage guidance. The Args block is somewhat redundant with the schema, but the overall description remains scannable and appropriately sized.

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 an 8-parameter query tool with no output schema, the description explains return behavior, filtering options, defaults, and a data-freshness precondition. It could say more about exact response fields or units, but an agent can invoke it correctly with the information given.

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%, so the schema already documents all parameters. The description's Args section mostly restates the schema, adding only the default bucket size and overall bounded-UTC framing without deeper parameter semantics.

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 states a specific verb and resource: query bounded UTC trend buckets for an observation kind and metric. It clearly separates this read-only trend query from sibling capture or write operations.

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?

It gives explicit guidance to call capture_observations_now first when recent data is missing, which directs the agent to the relevant alternative. It does not enumerate all exclusions, but the context for when to use this tool is clear.

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