Skip to main content
Glama

Get Account Usage

get_account_usage
Read-only

Retrieve account-wide cost, request, and error totals for a chosen time window and group them by day, hour, job type, model, or key. Requires an admin API key.

Instructions

Get the whole account's cost, requests and errors over a time window (the Usage screen of the dashboard). With group_by=key, 'panel' means jobs from the dashboard itself and 'deleted' all keys deleted since. Needs an ADMIN key.

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_account_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault
to_dateNoStart or end of the window, YYYY-MM-DD (or YYYY-MM-DDTHH:MM). Optional
group_byNoSplit the figures by day, hour, job type, model or key. Optional
from_dateNoStart or end of the window, YYYY-MM-DD (or YYYY-MM-DDTHH:MM). Optional

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.8.0

TDQS

A3.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint and openWorldHint, so the safety profile is covered; the description adds genuinely new context by disclosing the ADMIN key requirement, which is an authorization constraint no annotation conveys. It also explains the meaning of the 'panel' and 'deleted' breakdown under group_by=key, though 'all keys deleted since' leaves the reference point unclear.

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 short sentences with no filler, and the primary scope statement is front-loaded. The parenthetical about the dashboard Usage screen is a helpful anchor rather than padding.

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 an output schema present, return values need not be described, and annotations plus the ADMIN key note cover access and safety. The remaining gap is that all three parameters are optional yet the description never says what window or grouping applies by default, which is the main thing an agent could get wrong.

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 from_date, to_date and group_by are already fully documented with formats and enum values, making the baseline 3 appropriate. The description adds meaning only for the group_by=key breakdown categories, without explaining defaults or timezone handling for the date window.

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?

States a specific verb and resource with the measured fields named ('cost, requests and errors') and scopes it to 'the whole account' over a time window, which implicitly contrasts with the per-key sibling get_api_key_usage. It stops short of naming that sibling, so an agent must infer the split from the word 'whole'.

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?

The one clear routing signal is the prerequisite 'Needs an ADMIN key', which tells the agent whether it can call this at all. There is no explicit when-to-use versus get_api_key_usage or get_account, and no statement about what happens if the date window is left empty, so selection is only implied.

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