Skip to main content
Glama

query_metric

Read-onlyIdempotent

Run governed queries on one or more metrics over ISO date ranges. Group by dimensions and filter results to analyze Iceberg data without writing SQL.

Instructions

Query one or more metrics, optionally grouped by dimensions.

start and end are ISO dates (end is exclusive), for example start=2026-01-01, end=2026-04-01 for Q1 2026. Queries over large time spans may be refused by the cost cap; narrow the range if so. Results are capped at the server's row limit and report truncated=true when rows were cut.

Input Schema

NameRequiredDescriptionDefault
endNo
limitNo
startNo
filtersNo
metricsYes
order_byNo
descendingNo
dimensionsNo

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent and non-destructive, so safety is covered. The description adds real behavioral context beyond them: end is exclusive, large spans may be rejected by the cost cap, and results are row-capped with truncated=true when cut. That truncation/cost behavior is exactly the kind of trait an agent cannot get from annotations.

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?

Three sentences, front-loaded with the core action, then date semantics, then failure modes. The Q1 2026 example earns its space by anchoring the exclusive-end convention. No filler.

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

Completeness3/5

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

An output schema exists so return values needn't be described, and it correctly notes truncated=true as a signal. But for an 8-parameter query tool, the filtering/pagination/ordering surface (filters, order_by, descending, limit) is unexplained, leaving an agent to guess at the most non-obvious parts of the call.

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?

Top-level schema description coverage is 0% across 8 parameters, so the description must compensate and it only partly does: start/end semantics (ISO dates, end exclusive) and the dimensions grouping and row-limit/truncation link are covered, but filters, order_by and descending get no explanation anywhere. Partial compensation lands at the baseline 3.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource: 'Query one or more metrics, optionally grouped by dimensions.' This is clearly distinguishable in kind from siblings like list_metrics, describe_metric and explain_metric, which are inspection tools. It stops short of explicitly naming those siblings or the boundary between them, so it is not a 5.

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?

Gives one operational condition ('Queries over large time spans may be refused by the cost cap; narrow the range if so'), which is genuinely useful usage guidance. However it never says when to reach for query_metric versus explain_metric or list_dimensions, so the routing decision 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.