Skip to main content
Glama

Get account usage

stack_usage
Read-only

Get the account usage, spend and earnings for a period. consumption.activity is every audit event in the window. consumption.actions is the metered subset against the monthly allowance. allowance_coverage says whether limit and allowance_plan are known for that exact UTC month. allowance_plan is the plan the account is on (platform, internal, contract or none) for the current month and null for any other. An old unknown month never borrows the current plan. detail_coverage says whether by_kind is complete, partial, or unavailable. The result carries the included actions and the limit for the month; what further actions cost is on the price list (a contract plan has no limit). Reads, revocation, audit export, checkpoints, intent simulation, detector config, governance decisions, and configuration are not metered. For a white-label pool (a partner or one of its tenants) consumption.actions also carries pooled: true, and used is the whole pool the allowance applies to, own_used is the share of this account, and tenants is how many tenant accounts share it. Also returns seats, current-month pass-through allowances, account_since, unlimited inventory counts, retention, fair-use ceilings, actual STACK wallet spend, wallet balance, and publisher earnings. Provider cost estimates are not STACK spend. All money is in cents. The period defaults to the current billing period; since and until (ISO-8601 or unix-ms) set another window.

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

Input Schema

NameRequiredDescriptionDefault
sinceNoWindow start (ISO-8601 or unix-ms). Omitted: the current billing period.
untilNoExclusive window end (ISO-8601 or unix-ms).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior5/5

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

Annotations already declare readOnlyHint=true, destructiveHint=false and openWorldHint=false, and the description goes well beyond them: it enumerates what is and is not metered ('Reads, revocation, audit export, checkpoints, intent simulation, detector config, governance decisions, and configuration are not metered'), explains null semantics for allowance_plan, warns that an old unknown month never borrows the current plan, and states all money is in cents with provider cost estimates excluded from STACK spend. These are exactly the interpretive rules an agent needs to reason about the result correctly.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The purpose is front-loaded in the first sentence, but the body is a dense run-on chain of field-level notes with no grouping or paragraph breaks, mixing response semantics, billing rules, and window parameters. Most sentences carry real information for a tool with no output schema, yet the lack of structure makes it harder to scan than it needs to be.

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 takes on the full burden and does so thoroughly: it defines consumption.activity vs consumption.actions, the coverage flags, pooled white-label behavior (pooled/used/own_used/tenants), and the extra return fields such as seats, retention, wallet balance, and publisher earnings. An agent has enough context to interpret the response without guessing.

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% – both since and until already carry ISO-8601/unix-ms format and the current-billing-period default. The description's closing sentence restates the same facts without adding syntax, boundary handling (until is exclusive per the schema, not the description), or edge cases, so it does not meaningfully extend the schema. Baseline 3 applies when the schema does the heavy lifting.

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?

Opens with a specific verb and resource: 'Get the account usage, spend and earnings for a period,' which tells an agent exactly what comes back (usage, spend, earnings) and over what scope. It does not name or distinguish itself from the several usage-oriented siblings (stack_llm_usage_list, stack_llm_usage_summary, stack_proxy_usage, stack_scan_usage), so an agent must infer that this is the account-wide rollup rather than a per-service breakdown.

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 context is only implied through scope statements: the period defaults to the current billing period and since/until select another window, and the tool is framed as account-level rather than audit-level. There is no explicit 'use this when X, use stack_llm_usage_summary when Y' routing, and no stated prerequisites or exclusions relative to the sibling tools.

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.