Skip to main content
Glama

Query aggregated monitor stats

get_aggregates
Read-onlyIdempotent

Answer questions like 'how many times did the nightly import fail last week' or 'which checks had the worst success rate'. Returns totals for the range per monitor per environment (or per region for checks): run_count, complete_count, fail_count, tick_count, alert_count, event_count, duration_mean, downtime_seconds, uptime, and a derived success_rate, matching cronitor metric aggregate. Requires at least one of monitors, groups, tags, or types.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_aggregates"
  }
}

Input Schema

NameRequiredDescriptionDefault
endNoRange end as unix seconds. Defaults to now.
envNoEnvironment key or name. Defaults to the organization's default environment. A human saying 'staging' usually means the environment named staging.
tagsNoTags; includes every monitor carrying any of them.
timeNoNamed time range ending now. Overrides start and end.
startNoRange start as unix seconds. Defaults to one hour before end.
typesNoMonitor types to include.
groupsNoGroup keys; includes every monitor in each group.
regionsNoCheck regions to include. Defaults to every region.
monitorsNoMonitor keys to include.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and openWorldHint=false, so the safety profile is fully covered. The description adds genuine behavior: the aggregation grain (per monitor per environment, per region for checks), the exact output fields, a derived success_rate, and the at-least-one-filter requirement. It says nothing about volume limits, cardinality, or cost of wide ranges, which matters for a 365d aggregate.

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?

Two sentences, front-loaded with the user-facing question framing before the mechanical output listing. The field enumeration is long but justified because there is no output schema; overall wording is dense with little waste.

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?

With no output schema, the description compensates by enumerating every returned metric including success_rate, and with 9 fully documented parameters plus annotations the only remaining burden is the any-of filter rule, which is present. An agent has everything needed to construct a correct call.

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

Parameters4/5

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

Schema coverage is 100%, so the baseline is 3; the description earns a bump by stating a cross-parameter constraint the schema cannot express, namely that at least one of monitors, groups, tags, or types must be supplied (the schema shows zero required properties). It does not explain precedence between time and start/end beyond what the schema says.

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 description names a concrete verb (returns totals for the range) and resource (per monitor per environment, per region for checks), and grounds it in example questions so intent is unmistakable. It implicitly contrasts aggregation with raw metric retrieval but never names a sibling such as get_metrics, so sibling differentiation is left to inference.

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?

"Answer questions like 'how many times did the nightly import fail last week'" gives concrete when-to-use framing, and "Requires at least one of monitors, groups, tags, or types" states a hard pre-condition an agent must satisfy. It stops short of naming when to prefer a different tool or what to do when the question is about a single monitor's raw metrics.

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