Skip to main content
Glama

query_usage

Read-onlyIdempotent

Query time-bucketed usage telemetry this account's own backend has pushed or synced in (e.g. API request counts, tokens processed) — the raw data unit-economics metrics divide cost by (see list_unit_metrics/query_unit_costs), inspected directly rather than through a pre-defined ratio. quantity is a raw count with no currency — never treat it as money. Optionally broken down by external_customer_id when the pushed rows carry one. Mirrors GET /api/usage.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
end_dateNoISO-8601 end of the date range (exclusive)
group_byNoTime bucket size (default: day). "hour" is only supported for ranges of 7 days or less.
start_dateNoISO-8601 start of the date range (inclusive)
breakdown_byNo
filter_metricNoRestrict to these metric names
filter_source_idNoRestrict to usage pushed/synced under these usage-source ids
filter_external_customer_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, so the bar is lower, and the description still adds substantive context: the data source ('this account's own backend has pushed or synced in') and the warning that quantity is a unitless raw count, not currency. It does not describe pagination or result-size behavior, but adds clear value beyond the annotations.

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?

Purpose and the raw-vs-ratio distinction are front-loaded, and each clause carries information. It is a dense run-on sentence, slightly harder to parse than a cleanly split version, but not padded.

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?

With no output schema, the description does the work of explaining what comes back (time-bucketed usage with a unitless quantity) and disambiguates the key confusion (usage = counts, not money). It omits return shape details like bucket structure, which is a minor gap given the query tool's simplicity.

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 71%, so descriptions carry meaningful weight. The description explains breakdown_by ('optionally broken down by external_customer_id when the pushed rows carry one'), whose schema entry has an enum but no description, and clarifies the nature of returned quantities. It stops short of explaining filters or grouping semantics, but adds real meaning over 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?

States a specific verb and resource ('Query time-bucketed usage telemetry') and immediately scopes it as raw pushed/synced telemetry rather than a computed ratio. It explicitly distinguishes itself from the unit-cost siblings (list_unit_metrics/query_unit_costs) it sits beside in the tool list.

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 clarifies the choice between inspecting raw data here versus a pre-defined ratio via list_unit_metrics/query_unit_costs, which is real alternative guidance. It does not explicitly address where it stops relative to query_costs or query_events, so the guidance is clear but not exhaustive.

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