Skip to main content
Glama

All AI LLC API: documents and calculators

Credit balance and recent usage

get_credit_balance
Read-onlyIdempotent

Returns the remaining prepaid credits on your key and the last 20 credit events. Needs Authorization: Bearer <api_key>. Free.

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

Input Schema

NameRequiredDescriptionDefault
api_keyNoOptional. Only for clients that cannot send an Authorization header.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, and destructiveHint=false, so the description's added value is in disclosing the auth mechanism (Authorization: Bearer <api_key>) and that the call is free of charge, which matters for an agent that meters API spend. The 20-event window is a useful bounded-return detail, though nothing is said about what a credit event contains or what happens at zero balance.

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?

Three short sentences, front-loaded with what is returned, followed by auth requirement and cost. No filler and nothing an agent must read twice.

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 simple one-parameter read tool with no output schema, the description covers the return payload (remaining credits, last 20 events), the auth prerequisite, and the cost. The only minor gap is the shape of an individual credit event, which is low-risk given the tool's simplicity.

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?

Schema coverage is 100% and the single api_key parameter is already documented as optional for header-less clients. The description reinforces the primary auth path (Bearer header), which helps an agent understand the relationship between the header and the fallback parameter rather than repeating the schema verbatim.

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?

States a specific verb and resource: returns remaining prepaid credits plus the last 20 credit events. It is unambiguous what the tool produces, though it does not explicitly differentiate itself from any named sibling (none of the listed siblings deal with billing, so the risk is low).

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?

Usage is only implied: an agent can infer it should call this to check balance or recent credit activity. There is no explicit when-to-use statement, no mention of alternatives, and no guidance on how frequently to poll or whether to call it before paid operations.

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.