Skip to main content
Glama

Get usage

get_usage
Read-only

Read account usage and spend per API key, paginated newest first, with optional period or from/to date breakdowns.

Instructions

Read the account's usage and spend per API key, newest keys first, 10 keys per page (pass starting_after = the previous answer's next_cursor for the next page; limit up to 1000). Pass period (e.g. 7d, max 30d) for a by-date breakdown, or from + to. Needs a dashboard JWT or a custom-tier superkey; a plain inference key gets PERMISSION_DENIED (403). Needs a Relay credential.

Input Schema

NameRequiredDescriptionDefault
toNoEnd date `YYYY-MM-DD`; use together with `from`.
fromNoStart date `YYYY-MM-DD`; use together with `to`.
limitNoKeys per page (default 10, max 1000).
periodNoTime period shorthand, e.g. `7d` or `30d` (max 30 days); adds a by-date breakdown.
starting_afterNoCursor: the `next_cursor` of the previous page.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.8

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only supply readOnlyHint and openWorldHint, but the description adds the auth/authorization profile (dashboard JWT or custom-tier superkey; plain inference key returns PERMISSION_DENIED 403), the Relay credential requirement, and pagination mechanics including the next_cursor handoff. Those are the details an agent most needs before calling and are not available in structured fields.

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?

Three tightly packed sentences with the core purpose front-loaded and no filler. The parenthetical pagination and auth clauses are dense but each carries operative information; a small readability cost from cramming them into a single flow.

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?

With no output schema, the description still hints at the return shape via 'the previous answer's next_cursor', and it covers auth, credential requirements, pagination, and the two query modes. An agent has everything needed to call it correctly and iterate through pages.

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 100%, so every parameter is already documented with its format and bounds. The description largely restates the schema (limit up to 1000, period max 30d, from+to pairing), adding only the 'newest keys first' ordering and the pagination workflow, which earns baseline rather than above-baseline credit.

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 ('Read the account's usage and spend per API key') plus the sort order and page size. It is clearly distinguishable from sibling tools like get_credits, get_pricing, and estimate_cost, which concern balance, rates, and projection rather than per-key spend.

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?

Gives explicit conditions for the alternative parameter modes: use period for a by-date breakdown, or from + to for an explicit range, and warns that only dashboard JWT/custom-tier superkeys can call it. It does not name which sibling to use instead for related questions (e.g. get_credits for remaining balance), so it falls just short of full routing guidance.

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