Skip to main content
Glama

Get usage

get_usage
Read-onlyIdempotent

Get usage

Requests, tokens and spend over the last days whole UTC days, today included (days=1 is today so far), in total and by day, model and key. Every breakdown counts the same hours, so the totals equal the sum of byDay, of byModel and of byKey. Spend is what the account was charged, at our price, its customers' keys included.

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
daysNoWindow in whole UTC days, today included: 1 to 90.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare this a read-only, idempotent, non-destructive, closed-world call, so the safety bar is low. The description goes beyond that by defining the window semantics (whole UTC days, today included), the consistency invariant that totals equal the sum of byDay/byModel/byKey, and the meaning of 'spend' as the amount charged at the platform's price including customers' keys — genuinely useful domain semantics.

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?

Two dense sentences that are front-loaded with the window definition and then the breakdown/spend semantics. The redundant repetition of the title as the first line is the only wasted text; everything else earns its place.

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?

With a single optional parameter and no output schema, the description carries the return-shape burden, and it does so by naming the breakdown dimensions (day, model, key) and the invariant relating them. Missing only minor operational details such as pagination or rate limits, which are unlikely to matter for a fixed aggregate response.

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% with min/max and a default already documented, so the baseline is 3. The description still adds value by explaining that 'days' counts whole UTC days with today included and by giving the concrete edge case 'days=1 is today so far', which clarifies behavior the schema does not.

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 and resource and immediately enumerates the metrics returned: requests, tokens, and spend. It also scopes the resource to a UTC-day window and to the account level, which separates it from sibling account/budget tools such as get_balance or get_account_budget.

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?

Usage is only implied: an agent can infer this is the tool for consumption over a time window. There is no explicit when-to-use statement, no exclusion, and no routing to an alternative for account-level vs. key-level queries, so the agent must infer the fit from the resource name and metric list.

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