Skip to main content
Glama

get_usage

Read-onlyIdempotent

Retrieve account usage across authorized keys and sources, including request, completed/failed, and Credit counts for a UTC date range (default 7 days, max 31).

Instructions

Read account usage across all keys for sources permitted by this key: request counts, completed/failed counts and Credits by source. Defaults to 7 days; maximum 31 days. UTC from is inclusive and to exclusive, rounded down to minutes. Recent requests and refunds may not appear yet. Free.

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

Input Schema

NameRequiredDescriptionDefault
toNoExclusive UTC ISO timestamp, for example 2026-09-22T00:00:00Z. Date validity and the maximum 31-day window are checked by the usage API.
fromNoInclusive UTC ISO timestamp, for example 2026-09-21T00:00:00Z. With from alone, to is seven days later.
sourceNoAn authorized source, including youtube_download usage. Omit for all sources authorized by this key.
response_formatNoAgent-readable presentation. MCP defaults to Markdown; json returns the original JSON text, text returns indented fields. Structured fields remain available. Does not change billing or the stored job.markdown

Output Schema

NameRequiredDescriptionDefault
toNoExclusive UTC window end.
codeNoMachine-readable error code when the operation fails.
fromNoInclusive UTC window start.
noteNoAggregation delay and consistency limitations.
scopeNo
detailNoAdditional problem detail returned by the API.
totalsNoUsage across the authorized sources and all account API Keys.
messageNoError, delivery, or continuation instructions.
bySourceNo
updatingNoWhether pending aggregation work was observed.
observedAtNoUTC time of the usage snapshot.
request_idNoFlashData request identifier for support and tracing.
http_statusNoUpstream HTTP status, when an upstream request was made.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint and destructiveHint=false, so safety is covered; the description adds genuinely new traits — boundary semantics (UTC from inclusive, to exclusive, rounded down to minutes) and eventual consistency ('Recent requests and refunds may not appear yet'). It also flags 'Free', which matters for cost-sensitive agents. Return shape and any grouping/pagination behavior are left unstated, though an output schema exists.

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?

Five short clauses, front-loaded with what is read and returned, then constraints, then semantics, then caveat, then cost. The fragment 'Free.' is unusually terse but carries real selection value; nothing is padded or repeated.

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?

For a read-only reporting tool with a fully described 4-parameter schema and an output schema, the description covers everything an agent needs to call it correctly: window defaults and cap, timestamp boundary semantics, authorization scoping, freshness caveat, and cost. Return-value detail is correctly delegated to the output schema.

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 the baseline is 3; the description still adds value by restating the 7-day default and the 31-day cap in one place and by introducing minute-level rounding, which the schema does not mention. It does not explain the source enum or response_format trade-offs beyond what the schema already documents.

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 account usage across all keys') plus the exact payload ('request counts, completed/failed counts and Credits by source'), and scopes it by key authorization. That scope phrasing distinguishes it from sibling accounting tools such as get_balance, get_limits and get_pricing without needing to name them.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives real operating constraints (defaults to 7 days, maximum 31 days) and an implicit use case of usage/credit accounting. It never states when to prefer this over get_balance, get_limits or get_pricing, nor any when-not condition, so the choice between these adjacent reporting tools is left to inference.

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