Skip to main content
Glama

meta-tools.token_balance

Get the token balance for this API key.

When the key belongs to a project that has a spend cap, the allowance, tokens used, and tokens remaining are that cap for the current billing period. Every other key gets the account allowance and usage. The response includes the billing plan and when the period resets. Use this before expensive calls or when a call returns 402.

Cost = 0 tokens.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
tokens_usedNoTokens already counted against that limit in the current billing period.
billing_planNoCurrent billing plan id (free, starter, pro, scale).
tokens_remainingNoTokens left before that limit is reached.
billing_period_endNoISO 8601 end of the current billing period.
billing_period_startNoISO 8601 start of the current billing period.
monthly_token_allowanceNoToken limit for this key in the current billing period. A project key whose project has a spend cap reports that cap. Otherwise this is the account's monthly allowance.
billing_period_resets_atNoISO 8601 timestamp when the token allowance resets (same as period end).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changed
    • changedOutput schema / properties / monthly_token_allowance / description
      Previous value: -"Total tokens included in the current billing period."New value: +"Token limit for this key in the current billing period. A project key whose project has a spend cap reports that cap. Otherwise this is the account's monthly allowance."
    • changedOutput schema / properties / tokens_remaining / description
      Previous value: -"Tokens left before quota is exhausted."New value: +"Tokens left before that limit is reached."
    • changedOutput schema / properties / tokens_used / description
      Previous value: -"Tokens consumed in the current billing period."New value: +"Tokens already counted against that limit in the current billing period."
  2. First observed

TDQS

A4.7/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does well: it explains the two different balance semantics (project cap vs account allowance), enumerates response fields (allowance, used, remaining, billing plan, reset time), and notes the call is free ('Cost = 0 tokens'). The only minor gap is it doesn't state auth requirements, but the scoping to 'this API key' implies the credential context.

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?

Front-loaded with the core action, followed by the conditional balance logic, the response contents, and the usage guidance, closing with the zero-cost note. Every sentence adds distinct value with no redundancy.

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?

For a zero-parameter tool with an output schema, the description is more than complete—it pre-explains response semantics and the free-cost attribute, so an agent can invoke it confidently without inspecting the schema.

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?

There are zero parameters, so per the rubric the baseline is 4. The description has no parameters to add meaning to, and correctly focuses on behavior rather than fabricating parameter detail.

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?

States a specific verb and resource ('Get the token balance for this API key') and immediately scopes what the balance means, including the split between project spend caps and account allowance. It is unambiguous against the many clerk.* and other meta-tools siblings.

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?

Explicitly prescribes when to call it: 'Use this before expensive calls or when a call returns 402.' This gives a concrete trigger condition and a reactive use case, leaving little to inference.

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.