Skip to main content
Glama

Usage timeseries

usage_timeseries

Usage time series bucketed on each event's recorded_at (UTC; bucket=day|hour), grouped across meters by provider — a real time-series primitive, independent of meter creation times. Includes per-bucket breakdowns by consumer_class / channel / provider. est_accrued_minor is an estimate; authoritative billing stays with usage_summary.

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": "usage_timeseries"
  }
}

Input Schema

NameRequiredDescriptionDefault
sinceNoOptional. ISO-8601 timestamp: only items at or after this time.
untilNoOptional. ISO-8601 timestamp: only items before this time.
bucketNoday or hour.day
channelNoOptional filter: the channel the events came through.
meter_idNoThe meter id returned by create_meter.
providerNoAgent id of the party providing the service.
include_testNoOptional. Include events from meters flagged as test. Default false.
consumer_classNoOptional filter: internal, external or unknown.

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / additionalProperties
      Added value: +false
  2. Changed8 schema fields changed
    • addedInput schema / properties / bucket / description
      Added value: +"day or hour."
    • addedInput schema / properties / channel / description
      Added value: +"Optional filter: the channel the events came through."
    • addedInput schema / properties / consumer_class / description
      Added value: +"Optional filter: internal, external or unknown."
    • addedInput schema / properties / include_test / description
      Added value: +"Optional. Include events from meters flagged as test. Default false."
    • addedInput schema / properties / meter_id / description
      Added value: +"The meter id returned by create_meter."
    • addedInput schema / properties / provider / description
      Added value: +"Agent id of the party providing the service."
    • addedInput schema / properties / since / description
      Added value: +"Optional. ISO-8601 timestamp: only items at or after this time."
    • addedInput schema / properties / until / description
      Added value: +"Optional. ISO-8601 timestamp: only items before this time."
  3. Added

TDQS

A4.3/5.0
Behavior4/5

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

Annotations only declare safety flags, so the description carries the semantic load and does so well: it discloses the time anchor (recorded_at, UTC), aggregation granularity, included breakdown dimensions, and warns that est_accrued_minor is an estimate rather than billing truth. It does not discuss result size, limits, or zero-event buckets, which keeps it from a 5.

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 core aggregation mechanic, then the caveat, in three tight sentences with no filler. The wording is dense and slightly jargon-heavy ('real time-series primitive') but each clause carries information an agent needs to pick and call the tool correctly.

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 tool has an output schema, so return shape need not be restated, and the description still flags the one output field whose authority matters (est_accrued_minor). All eight params are schema-documented; the only gap is no mention of result limits or how empty buckets are represented.

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 baseline is 3, and the description adds genuine meaning on top: it explains that bucket accepts day|hour, that provider acts as the grouping key, that consumer_class/channel drive included per-bucket breakdowns, and that filtering is on event recorded_at rather than meter timestamps.

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 names a specific verb+resource (usage time series) and pins the aggregation axis: bucketed on each event's recorded_at, not meter creation time, grouped by provider with per-bucket breakdowns. The phrase 'a real time-series primitive, independent of meter creation times' plus the pointer to usage_summary makes it clearly distinguishable from the sibling summary tool.

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?

It gives a clear selection rule against usage_summary ('est_accrued_minor is an estimate; authoritative billing stays with usage_summary') and clarifies that bucketing is event-anchored rather than meter-anchored, which is when-to-use context. It stops short of an explicit 'use this when vs. do not use it when' statement, so it is clear but not fully prescriptive.

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.