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.

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

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. Signed in with 1Profile and owning several projects, it picks one)
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. Changed1 schema field changed
    • changedInput schema / properties / project_id / description
      Previous value: -"Cred project ID (optional; the API key already identifies the project)"New value: +"Cred project ID (optional; the API key already identifies the project. Signed in with 1Profile and owning several projects, it picks one)"
  2. First observed

TDQS

A4.1/5.0
Behavior5/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 so well: it discloses that an unknown user returns an empty balances array instead of an error, that each call costs 1 CRD even if later rejected, that a 429 RATE_LIMITED is free, and that errors carry a request_id to quote to support. It also explains the x402 payment path. These are exactly the behavioral traits an agent cannot infer 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?

Dense and orderly: action first, then identity resolution, then cost/error semantics. Nothing is wasted.

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 and no annotations, so the description must explain results and failure modes, and it does: empty balances array for unknown users, CRD cost accounting, 429 exemption, and request_id on errors. That is complete for a six-parameter read tool with optional inputs.

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 already 100%, so the schema fully documents all six parameters, including the email-first ordering and the user_id fallback. The description largely restates that ordering and the external-ID nature of user_id rather than adding new meaning. Baseline 3 is appropriate 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?

The description gives a specific verb and resource: "Get a user's credit balance(s)". It is clearly a read of balance data, not transactions, wallet, or settings, so it is distinguishable from most siblings. However, it never explicitly names or contrasts a sibling such as get_user_wallet or get_transactions, so it falls short of full differentiation.

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?

It gives useful input-selection guidance: identify the user by email (checked first) or user_id (external ID as fallback). That is about how to call it rather than when to choose it over the alternatives. It does not say when to prefer get_balance over get_transactions or get_user_wallet, so the usage guidance is only implied.

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