Skip to main content
Glama

metrics

Query a metric time series.

The output shape depends on the metric type:

  • GAUGE: avg, min, max per bucket; no sum or rate.

  • SUM: delta sum and rate per bucket (handles cumulative counters with reset detection; the delta sum across the window is the total increase).

  • SUMMARY: count, sum, and avg per bucket; quantiles are intentionally omitted — SUMMARY quantiles are non-aggregatable across series (and the raw quantiles column is not queryable via run_sql).

  • HISTOGRAM / EXPONENTIAL_HISTOGRAM: count, sum, min, max, and p50/p90/p95/p99 (windowed, interpolated).

groupBy and filters operate on data-point attribute keys (not resource attributes). Keys must match [A-Za-z0-9_.-]{1,128}. Filter values are safe to pass as-is.

Params: metricName: required — the exact metric name (from list_metrics). service: optional — exact service name (from list_metrics); omit to aggregate the metric across ALL services emitting it. from, to: required — ISO-8601 window boundaries. step: optional — "", units s m h d w mo y (e.g. "30s", "15m", "2h", "1d", "1w", "1mo", "1y"); minimum 10s; omit for a single window per group. groupBy: optional list of attribute keys to split results by. filters: optional map of attribute key → value to narrow the series.

Returns: type, points[], queryStats, step, requestedStep, coarsened, coarsenReason, explorerUrl.

The server may coarsen the step to stay within point caps. The response's "step" field — not the requestedStep — is authoritative for rate math; "coarsened" + "coarsenReason" (SERIES_CAP | TOTAL_CAP | GROUP_OVERFLOW) report what happened.

explorerUrl opens this exact series as a chart in the Fixter UI — attach it when citing the series as evidence to the user (a spike, a drop, an anomaly, a comparison). You may append &agg=<rate|sum|count|avg|min|max|p50|p90|p95|p99> matching the aggregation you actually cite; invalid values degrade silently to the metric type's default. explorerUrl is null when the query used groupBy, filters, or omitted service — the UI page cannot reproduce those views.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
toYesEnd of window, ISO-8601 instant (exclusive)
fromYesStart of window, ISO-8601 instant (inclusive)
stepNoTime bucket <amount><unit>, units: s m h d w mo y (e.g. 30s, 15m, 2h, 1d, 1w, 1mo, 1y); min 10s; omit for one window
filtersNoAttribute key=value filters to narrow the series
groupByNoAttribute keys to group by
serviceNoExact service name (from list_metrics); omit to aggregate across all services
metricNameYesMetric name (exact, from list_metrics)

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 behavioral burden and excels: it discloses how output varies by metric type, the rule that groupBy/filters only apply to data-point attributes with a key regex, server-side step coarsening semantics, and the exact conditions under which explorerUrl is null. This is far beyond a minimal hint.

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 long but every section serves a purpose: the metric-type list, parameter semantics, and return/coarsening details are all essential for correct use. It is front-loaded with the core purpose, then organized by logical sections, making it easy to scan despite its length.

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?

Given the tool's complexity (7 parameters, nested objects, no output schema), the description is exceptionally complete. It explains return fields, coarsening behavior, the authoritative 'step' field, and explorerUrl usage with caveats—covering both invocation and interpretation of results.

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?

Although schema coverage is 100%, the description adds substantial meaning: metricName and service must be exact values from list_metrics, step has a specific syntax with unit examples and a minimum, from/to are inclusive/exclusive, groupBy/filters operate on data-point attributes, and filter values are safe to pass as-is. This transforms bare parameter names into actionable guidance.

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 clear verb and resource: 'Query a metric time series.' It distinguishes itself from sibling tools like logs, spans, and run_sql by focusing on metric queries, and the detailed breakdown of metric types (GAUGE, SUM, SUMMARY, HISTOGRAM) reinforces its unique purpose.

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 provides strong context for when to use the tool—whenever metric time-series data is needed—and clarifies scope with details like optional service aggregation and groupBy/filters constraints. It does not explicitly mention when not to use it or name alternative tools, but the purpose is clear enough to guide selection.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A3.8/5.0
Disambiguation2/5

Several tool pairs are near-duplicates, including three deprecated aliases (add_investigation_alert_channel vs add_alert_channel, list_investigation_alert_channels vs list_alert_channels, remove_investigation_alert_channel vs remove_alert_channel) that muddy the surface. Additionally, suppress_signal and create_ignore_rule both suppress alerting via different mechanisms, which could cause misselection despite detailed descriptions.

Naming Consistency4/5

The vast majority of tools follow a clear verb_noun snake_case pattern (create_api_test, list_issues, set_alert_rule_status). A few bare-noun tools (logs, spans, metrics) and the standalone verb correlate break the pattern slightly, but overall the naming is highly consistent and predictable.

Tool Count1/5

With 52 tools, this is on the extreme end of the calibration scale. Even accounting for the broad scope of an observability platform, the count is excessive and includes several deprecated redundancies that inflate it further.

Completeness5/5

The toolset provides comprehensive CRUD/lifecycle coverage across all major domains: alert rules (create, read, update, delete, status, delivery, preview), API tests (create, read, update, delete, run history, credentials), ignore rules and suppressions, issues with digest config, investigations with claim/read, channels, credentials, and rich query tools (logs, spans, metrics, SQL, traces, correlation). No obvious dead ends or missing core operations.

Resources