Skip to main content
Glama

Get usage

get_usage
Read-only

Use this when the user asks how much was used or spent over a period. Returns calls, billed units, misses, errors and spend for each UTC day of the range, by product and by route. Without dates it covers the last 30 days; a range covers 90 days at most. A connection without full access sees only its own usage. 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
toNoThe last UTC day, as `YYYY-MM-DD`. A range covers at most 90 days.
fromNoThe first UTC day, as `YYYY-MM-DD`. Without `from` and `to`, the last 30 days, today included.
apiKeyIdNoOnly this key's usage. A key without full access reads only its own.

Schema Changelog

Changes observed during successful MCP inspections.

No schema history has been recorded yet.

TDQS

A4.3/5.0
Behavior5/5

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

Annotations already declare this a safe read, but the description adds substantial traits beyond them: a 30-day default, a hard 90-day range cap, per-day/product/route granularity, permission scoping ('a connection without full access sees only its own usage'), and cost ('Free'). These are exactly the operational facts an agent needs before calling a read tool.

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?

Roughly sixty words in five short sentences, front-loaded with the when-to-use trigger and then the return shape, defaults, caps, permissions and cost. Every sentence carries distinct information with no filler.

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 compensates by naming the returned fields and their grouping, and it covers defaults, maximum range, and access scoping. Nothing an agent needs to call it correctly is missing for a three-optional-parameter read 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 description coverage is 100%, so each of the three parameters is already documented with format and defaults. The description's date-default and 90-day statements largely restate what the schema says, and its apiKeyId-related note refers to connection access rather than the parameter's own semantics. Baseline 3 is appropriate.

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 names a concrete verb+resource ('how much was used or spent over a period') and enumerates the returned metrics (calls, billed units, misses, errors, spend) with their breakdown (per UTC day, by product, by route). That is far more specific than the name alone. It does not explicitly contrast itself with usage-adjacent siblings such as get_balance or get_account, so it stops short of a 5.

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?

'Use this when the user asks how much was used or spent over a period' gives a clear selection trigger. There is no when-not guidance and no named alternative for adjacent questions (e.g. current balance versus historical usage), which keeps it below a 5.

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