Skip to main content
Glama

get_usage_report

Retrieve token usage data from the Messages API. Query input, output, and cache token counts along with request volumes, aggregated by custom time windows and dimensions like workspace or model.

Instructions

Get detailed token usage from the Messages API.

Returns input/output/cache token counts and request counts, bucketed by the requested time window and grouped by the requested dimensions. Use this for questions like 'how many Opus tokens did workspace X burn yesterday' or 'show daily request volume for the last week grouped by model'. Data appears within ~5 minutes of API calls.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
starting_atYesRFC 3339 start time, e.g. '2026-05-01T00:00:00Z'
ending_atNoRFC 3339 end time. Defaults to now.
bucket_widthNoAggregation window: '1m', '1h', or '1d'1d
group_byNoDimensions to group by. Any subset of: 'workspace_id', 'api_key_id', 'model', 'service_tier', 'context_window'. Omit for an org-wide total.
limitNo
pageNoPagination cursor from previous response

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior3/5

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

With no annotations, the description carries full burden. It discloses data freshness but omits rate limits, authentication requirements, or behavior on empty results. Adequate but not exhaustive.

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?

Concise: two sentences for purpose and latency, then bullet-like examples. No filler. Could be slightly more structured (e.g., separate sections) but efficient.

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?

Has output schema, so return format is covered. Description includes usage context, examples, and latency. Lacks details on pagination and error conditions, but overall sufficient for a reporting tool.

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 coverage is 83%, so baseline is 3. Description adds context via examples and mentions bucketing/grouping, but does not explain each parameter beyond what the schema already provides. Marginal added value.

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 clearly states the tool retrieves detailed token usage from the Messages API and lists return fields (token counts, request counts). It distinguishes from siblings like get_cost_report by emphasizing dimensions and time bucketing, but does not explicitly name alternatives.

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?

Provides concrete example questions and mentions data latency (~5 minutes). However, it does not state when to avoid using this tool or suggest alternatives for other reporting needs.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Trushtonfactory/anthropic-admin-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server