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

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint, so the safety profile is covered. The description adds meaningful behavioral context beyond that: the data is pushed/synced backend telemetry, `quantity` must never be treated as currency, and external_customer_id breakdown only applies 'when the pushed rows carry one.' This is useful, though it does not cover response pagination or full return shape.

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?

The description is compact and front-loaded: the first sentence states the tool's core purpose and scope, followed by a necessary money-handling warning, a breakdown note, and an API mirror reference. Every sentence contributes valuable information without redundancy.

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?

Given seven optional parameters, no output schema, and many sibling tools, the description does a strong job covering purpose, raw/cost distinction, currency caveat, and optional breakdown. It still leaves a small gap around what the query response contains beyond `quantity` and any pagination behavior, but the description plus schema and annotations are sufficient for correct tool selection and basic invocation.

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 71%, so most parameters are already documented. The description supplements this by explaining the semantic framing ('raw count, no currency') and the external_customer_id breakdown condition, which helps for breakdown_by. However, it does not add meaningful guidance for filter_external_customer_id or clarify the meaning of the two undocumented parameters beyond their inferable names.

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 ('Query') and resource ('time-bucketed usage telemetry'), and narrows the scope to data 'this account's own backend has pushed or synced in.' It also distinguishes itself from related unit-economics tools by saying the data is 'inspected directly rather than through a pre-defined ratio' and warns that `quantity` is a raw count, not money.

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?

The description clearly positions this tool as the raw-data counterpart to cost or ratio metrics, even pointing to list_unit_metrics/query_unit_costs as related alternatives. It does not explicitly enumerate when to prefer query_events or query_costs, but the 'raw count with no currency' warning and 'rather than through a pre-defined ratio' phrase provide usable routing context.

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.

TDQS

A3.9/5.0
Disambiguation4/5

Tools are organized by resource (budgets, alerts, anomalies, dashboards, cost tags, recommendations), so most are clearly separable. The cost-tag cluster and the dimension/facet listers are the places where an agent could misselect by name, though descriptions resolve the ambiguity.

Naming Consistency5/5

All tools use snake_case verb_noun names with a clear convention: get_ fetches specific items, list_ enumerates collections, and query_ runs time-bucketed or analytical queries. The pattern holds across all 29 tools with no camelCase or mixed verb styles.

Tool Count2/5

29 tools is well past the typical 3–15 sweet spot and even past the 16–25 heavy band, so the surface feels sprawling despite having few duplicates. Each tool maps to a distinct endpoint, but the sheer number makes it a heavy set for an agent to select from.

Completeness2/5

The read-side is strong: costs, usage, tags, budgets, alerts, anomalies, dashboards, recommendations, and data health are all queryable. However, the surface is almost entirely read-only, and descriptions reference absent tools like create_budget, create_alert_subscription, create_dashboard, set_dashboard_widgets, and delete_dashboard, creating dead ends. That is a significant gap for a cost-management platform.

Resources