Skip to main content
Glama

get_balance

Get a user's credit balance(s). Identify the user by email (checked first) or user_id (your external user ID). An unknown user returns an empty balances array, not an error. Costs 1 CRD (platform credit) per call, charged even when the call is then rejected (a 429 RATE_LIMITED costs nothing). Error results include request_id; quote it to support.

Input Schema

NameRequiredDescriptionDefault
emailNoUser email (checked first)
api_keyNoCred API key (optional if set via the x-api-key header)
user_idNoExternal user ID (fallback)
project_idNoCred project ID (optional; the API key already identifies the project)
x402_paymentNoBase64 x402 PaymentPayload, only when a previous call failed with an x402 PaymentRequired because the account is out of CRD
credit_type_idNoOnly this credit type

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior5/5

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

With no annotations present, the description carries the full burden and does so: it discloses per-call cost (1 CRD), that rejected calls are still charged, that a 429 RATE_LIMITED is free, that an unknown user yields an empty balances array rather than an error, and that errors carry a request_id to quote to support. These are non-obvious billing, error, and rate-limit behaviors an agent could not derive from the schema.

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?

Four tight sentences, front-loaded with the action and then the identification rule, followed by the two things most likely to trip an agent: empty-vs-error results and billing. No sentence is redundant and the parenthetical cost clarification is efficient.

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?

For a six-parameter, zero-required read tool with no output schema and no annotations, the description covers identification, the empty-result edge case, billing, rate limits, and error identifiers. It stops short of describing the shape of a returned balance entry or how credit_type_id filters the result, which are the remaining gaps.

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%, so all six parameters are already documented, including precedence markers "checked first" and "(fallback)". The description reinforces the email-first resolution rule and clarifies that the unknown-user case returns an empty array, but adds little semantic detail beyond what the schema already provides, so the baseline 3 applies.

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?

"Get a user's credit balance(s)" is a specific verb plus resource with clear scope, and the identification rules (email first, user_id fallback) sharpen what the call targets. It never names a sibling such as get_user_wallet or get_transactions, so an agent must infer the boundary between balance lookup and wallet/transaction lookups.

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 description gives concrete usage mechanics for identity resolution (email is checked first, user_id is the external ID) and a conditional path for x402 payment, but it never states when to prefer this tool over get_user_wallet, get_transactions, or list_credit_types. Usage is implied by the resource name rather than explicitly routed.

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