Skip to main content
Glama

Query daily metrics

query_daily

Daily records or week/month aggregates. aggregation identifies sum or unweighted average of stored daily values; daily_min/max are extrema of daily values, not raw samples. days_present counts stored dates; days_expected counts calendar dates in period_start/end clipped to the request, not expected sensor wear. Units and aggregation methods are kept separate. Entirely missing buckets/metrics have no row: missing is not zero. Weekly labels use SQLite %Y-W%W (Monday weeks split at New Year), not ISO weeks; use period_start/end. Limit 500 rows. If truncated, discard the partial response and re-query smaller non-overlapping ranges aligned to complete buckets, or fewer metrics. Do not combine partial bucket averages without weighting by days_present.

Input Schema

NameRequiredDescriptionDefault
toYes
fromYes
metricsYes
granularityNo

Output Schema

NameRequiredDescriptionDefault
rowsYes
truncatedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.3/5.0
Behavior4/5

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

The description adds substantial context beyond the annotations: a hard 500-row limit, truncation handling, the rule that missing buckets produce no row rather than zero, and the non-ISO SQLite %Y-W%W week labeling with a pointer to period_start/end. The annotations declare readOnlyHint=false for what reads as a pure retrieval tool; the description never addresses side effects, so it neither confirms nor contradicts that hint, but the operational detail it does supply is genuinely valuable.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

It is front-loaded with purpose and packs real information, but it reads as a dense run-on of caveats, with several sentences devoted to output-field semantics. The clause 'Units and aggregation methods are kept separate' is opaque and does little work for the reader.

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?

The tool ships an output schema, so much of the text explaining aggregation, daily_min/max, days_present, and days_expected restates what structured output already conveys, while the required metrics identifiers and the from/to clipping semantics go unexplained. Truncation and missing-data behavior are well covered, making it adequate but unevenly complete for a four-parameter query tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% across four parameters, so the description must carry the load and largely does not. It refers to 'aggregation' and 'period_start/end', which are not parameter names (the parameters are granularity, from, to, metrics), leaving the required metrics array — which metric identifiers are valid — and the day/week/month granularity semantics undocumented. Only the week/month aggregation behavior is loosely implied.

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?

The opening sentence establishes the resource and scope precisely: daily metric records, or week/month aggregates of them. The verb is implicit (retrieval is implied by 'Query'), and there is no differentiation from siblings like list_metrics or derived_metrics, which an agent could easily confuse with this tool.

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?

It gives solid operational guidance for one scenario — what to do when the 500-row limit truncates results (discard and re-query smaller aligned ranges, or fewer metrics) — and warns against combining partial averages without weighting by days_present. However, it never says when to prefer this tool over list_metrics or derived_metrics, leaving the main selection decision to inference.

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.

Resources