Skip to main content
Glama

Aggregate Test Runs

aggregateTestRuns
Read-onlyIdempotent

Aggregate test-run counts; groupBy outcome | runType | configId | catalogueTestId | phoneNumber; optional timeBucket day/week/month with UTC ISO8601 bucket keys ("2026-05-12" day, "2026-W19" week, "2026-05" month). Use cases: "% pass/fail this week", "which compliance test fails most", "day-by-day pass count last 2 weeks". ALWAYS use this for "how many", "what share" and "which fails most": counting by paging through listTestRuns gives wrong totals. Filters: runType (mission | compliance | param | load; load = the individual calls load tests made, which are never counted as param), outcome, phoneNumber, configId, catalogueTestId, startedAfter/startedBefore. configId matches the runs of one saved test, standard or mission; there is NO configName filter here, so to count the runs of a named test find its id first (listTestConfigs for a standard test, listMissionTestConfigs for a mission test). With groupBy=configId the keys are ids: name one with getTestConfig (most are standard tests), or getMissionTestConfig if that returns 404. A key of "unknown" means runs with no value for that field. Response capped at top 100 groups by count desc; truncated:boolean indicates cap hit. For whole load-test runs and their statistics use listLoadTestRuns or getLoadTestStatus; listLoadTests lists the saved load tests. D-12: groupBy=stepName returns 400 — for step-level breakdowns within a single run use getRunResults; for step-level aggregation across runs see Phase 1.1.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "groupBy": "<groupBy>"
    },
    "name": "aggregateTestRuns"
  }
}

Input Schema

NameRequiredDescriptionDefault
groupByYesDimension to group counts by. `stepName` is rejected (D-12).
outcomeNoPre-filter runs by outcome before grouping.
runTypeNoPre-filter runs by type before grouping. `load` is load-test calls.
configIdNoPre-filter runs launched from a specific saved config before grouping.
timeBucketNoUTC ISO8601 time granularity (Q-5). Omit for flat group counts.
phoneNumberNoPre-filter runs by destination number (E.164 exact) before grouping.
startedAfterNoISO8601 lower bound for startedAt (inclusive), applied before grouping.
startedBeforeNoISO8601 upper bound for startedAt (inclusive), applied before grouping.
catalogueTestIdNoPre-filter runs by compliance catalogue test ID before grouping.

Output Schema

NameRequiredDescriptionDefault
groupsNoFlat groups sorted by count descending (present when no timeBucket).
bucketsNoTime-bucketed groups (present when timeBucket provided). Q-5 UTC ISO8601 keys.
truncatedYesTrue when more than 100 unique group keys existed (Q-6 cap hit).
totalGroupsYesTotal distinct group keys before the 100-group cap.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so the description is judged on added context — and it does add real context: the top-100 group cap with a truncated boolean, the 'unknown' key for missing field values, load runs never being counted as param, and the D-12 400 on groupBy=stepName. The main gap is that it never says how counts are returned (object vs array, whether timeBucket expands into multiple buckets per group), leaving the primary output shape to the output schema.

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?

Front-loaded with the aggregation purpose and groupBy enum, then filters, then edge cases; nearly every sentence carries operational information. It is dense and long, and the trailing D-12/Phase 1.1 note is a bit cryptic, but there is no filler to cut.

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?

For a 9-parameter aggregation tool with a full schema and an output schema, the description covers selection, filtering, grouping, bucketing, result capping and the main failure modes. Nothing an agent needs in order to call it correctly, or to interpret a truncated or 'unknown'-keyed result, is missing.

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 above that by adding semantics the schema lacks — the concrete UTC bucket key formats ('2026-05-12', '2026-W19', '2026-05'), configId matching runs of exactly one saved config, the load-vs-param distinction, and the absence of a configName filter with a prescribed two-step id resolution.

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?

Names a specific verb and resource ('Aggregate test-run counts') plus the exact grouping dimensions, and explicitly contrasts itself with listTestRuns ('counting by paging through listTestRuns gives wrong totals'), so an agent can tell the two apart without opening either schema.

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?

States the trigger phrases verbatim ('how many', 'what share', 'which fails most') with an ALWAYS directive, and routes each alternative case by name: listTestRuns for paging, listLoadTestRuns/getLoadTestStatus/listLoadTests for whole load runs, getRunResults for step-level detail, listTestConfigs and getMissionTestConfigs for resolving a test name to an id.

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.