Skip to main content
Glama

Account balance

account_balance
Read-onlyIdempotent

Get the balance of the AIMLAPI account that owns this API key, and whether it is running low. Use it before a costly generation or after an insufficient_balance error; for what this key has spent and its spending limit, use account_usage. Free. Returns balance_usd and low_balance_threshold_usd (report amounts to the user in USD), low_balance (true when the balance is below that threshold) and status; balance and low_balance_threshold are the same amounts in API credits (2,000,000 credits = $1).

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

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare readOnly/idempotent/non-destructive, and the description adds non-obvious context beyond them: the call is free (no cost to the account), the units are mixed USD and API credits with an explicit conversion rate, and the agent is told to report amounts in USD. It doesn't cover rate limits or caching, but for a zero-param read that's a minor gap.

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?

Front-loaded with purpose, then usage, then return shape; no filler. The returns clause is dense but each element earns its place given there is no output schema. Slightly long, but nothing is redundant.

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 and zero params, the description carries the full burden and does: it explains what is returned, the two unit systems and their conversion, and the meaning of low_balance. Nothing an agent needs to call or interpret the result is missing.

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?

Zero parameters, so the baseline is 4; the description correctly spends no words on inputs and instead maps the response fields (balance_usd, low_balance_threshold_usd, low_balance, status, credit equivalents), which compensates for the absent output schema.

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 balance of the AIMLAPI account that owns this API key') plus the derived 'whether it is running low' signal, and explicitly distinguishes itself from account_usage. An agent can tell this apart from the sibling 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?

Gives explicit trigger conditions ('before a costly generation or after an insufficient_balance error') and names the alternative with its selecting condition ('for what this key has spent and its spending limit, use account_usage'). Both when-to-use and when-to-use-something-else are covered.

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