Skip to main content
Glama

query_stats

Destructive

Aggregate event signals into summary statistics for any geographic area and time window: total count plus daily and category trends. Returns roll-ups, not rows, to minimize cost.

Instructions

Aggregate statistics over the signal corpus — total event count plus per-category and per-day breakdown (trend) for a bounding box and date window. Cheaper than query_signals (returns roll-ups, not rows). NOTE the unit: total counts article-deduped events (meta.population = article_deduped_events), which is NOT cluster-collapsed, so it is >= the query_signals count for the same window. Costs 1 token(s) per call.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bboxNoBounding box [minLon, minLat, maxLon, maxLat] (WGS84). Omit for worldwide.
dateNoWindow end date, YYYY-MM-DD (UTC). Defaults to today.
daysNoWindow length in days. Defaults to 1.
categoriesNoRestrict to these categories. Omit for all.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
metaYesQuery echo, token charge/balance (meta.tokens), and pagination where applicable.
statsYes
summaryNoOne-line natural-language summary of the result, ready to relay to a user.
Behavior1/5

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

The annotation destructiveHint=true contradicts the description's implication of a read-only aggregation tool. The description discloses important behavioral traits (cost, unit semantics, non-cluster-collapsed counts), but the contradiction with annotations forces a score of 1 per the rubric.

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, all valuable: purpose, cost/comparison, and unit nuance. No fluff or repetition; information is front-loaded with the primary function.

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?

The description covers the tool's purpose, alternative, cost, and output semantics. An output schema exists, so the return field details are not required. The only gap is the unresolved contradiction with destructiveHint, which slightly reduces completeness.

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% (all 4 parameters have descriptions), so the baseline is 3. The tool description adds general context about bbox/date windows but does not provide additional parameter-level semantics beyond 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?

The description clearly states the tool's function: 'Aggregate statistics over the signal corpus' with specific outputs (total event count, per-category, per-day breakdown). It explicitly distinguishes itself from the sibling tool query_signals by saying it returns roll-ups rather than rows.

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

Usage Guidelines5/5

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

Provides explicit guidance on when to use this tool versus the alternative: 'Cheaper than query_signals (returns roll-ups, not rows)' clearly indicates it is for aggregate needs rather than detailed row-level queries.

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

Install Server

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/Off-Nadir-Lab/offnadir-delta-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server