Skip to main content
Glama

Get Usage

get_usage

Reports actual NaN credit consumption and remaining balance, reset date, and per-model token and credit totals for a period. Use it for accurate usage checks instead of stale quota counters.

Instructions

Report real consumption and the credit pool from NaN (GET /v1/usage): credits used, remaining and reset date, then per-model requests, input/output/cached tokens and credits, with totals. Defaults to the current credit period. Prefer this over get_quota, whose counters can be stale. Read-only and free. Undocumented endpoint that accepts the same sk- key; it may change without notice.

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
end_dateNoLast day, YYYY-MM-DD. Default: today
start_dateNoFirst day, YYYY-MM-DD. Default: start of the current credit period

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv1.5.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does real work: it discloses read-only and free operation, that the endpoint is undocumented and may change without notice, and that it accepts the same sk- key (an auth requirement). It stops short of covering pagination, error behavior, or what a missing/zero record looks like, so it is strong but not exhaustive.

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 dense sentences, front-loaded with purpose then return shape, then the alternative and caveats — no wasted framing. The return-field enumeration is a long run-on clause, which slightly hurts scannability, but every element is informative.

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?

There is no output schema, so the description's field-by-field account of the response is exactly what an agent needs, and the volatility/auth warnings cover the operational risk of an undocumented endpoint. For a two-optional-parameter read tool, nothing material is missing.

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% and both parameters already document YYYY-MM-DD format and defaults, so the description's date-range note largely restates the schema. No additional syntax, timezone, or boundary-inclusivity guidance is added, making the baseline 3 correct.

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 provides a specific verb and resource ("Report real consumption and the credit pool from NaN, GET /v1/usage") and then enumerates the returned fields: credits used/remaining/reset date plus per-model requests, tokens, and credits with totals. It explicitly contrasts itself with the sibling get_quota, so an agent can select it without opening either schema.

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

Usage Guidelines5/5

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

It states the default scope ("Defaults to the current credit period") and gives an explicit routing rule: "Prefer this over get_quota, whose counters can be stale." That names the alternative and the condition selecting it, leaving nothing to inference.

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