Skip to main content
Glama

Metadata MCP Connector

Get AI Credit Balance

get_credit_balance
Read-only

Get the current Metadata AI credit balance for the account this token belongs to.

                USAGE INSTRUCTIONS FOR LLM:
                Tool calls against this server consume AI credits. When the balance reaches zero
                or goes negative, billable tools may refuse with an
                OUT OF CREDITS error. This tool is how you check
                the balance before that happens, and how you confirm a top-up has landed.

                WHEN TO USE THIS TOOL:
                - Another tool just failed with OUT OF CREDITS — check here before retrying
                - The account owner says they have paid, and you need to know if it landed yet
                - The user asks "how many credits do I have?" or "what's my AI balance?"
                - Before starting a long batch of tool calls, to confirm there is headroom

                IMPORTANT — AFTER A TOP-UP, POLL, DO NOT SPIN:
                Payment settles ASYNCHRONOUSLY. A card can be charged successfully and the
                balance still read as exhausted for a minute or two while the payment clears.
                Poll this tool every 20-30 seconds, not continuously. Resume the work you were
                doing only once `is_exhausted` is false.

                EXPECTED RESPONSE FORMAT:
                {
                  "account_id": "1234",
                  "balance_usd": 42.5,      // may be NEGATIVE — that is a real state
                  "updated_at": "2026-08-07T12:00:00",
                  "is_exhausted": false     // true means other tools will refuse
                }

                On failure returns {"error": "..."} — treat an unreadable balance as unknown,
                not as zero, and do not tell the user they are out of credits because of it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already mark this as read-only, but the description adds substantial behavioral insight: balance can be negative, payment settlement is asynchronous, and an unreadable balance should be treated as unknown rather than zero. It also explains the consequence of exhaustion—billable tools may refuse with OUT OF CREDITS. This far exceeds annotation coverage.

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?

The description is lengthy but well organized with clear headers, bullet lists, and a response-format block. Every major section earns its place, though some points are slightly redundant—for example, the balance-checking purpose appears both in the opening and again in the usage bullets. Minor repetition prevents a perfect score.

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, the description fully compensates by providing the expected response shape, including field-level notes and the fact that balance_usd may be negative. It also covers the failure response and instructs the agent how to interpret errors. For a zero-parameter read-only tool, nothing important 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?

The input schema has zero parameters and 100% schema description coverage, so the baseline is 4. The description clarifies the implicit account binding ('the account this token belongs to'), which adds useful context even though no explicit parameters exist. No parameter documentation is needed beyond this.

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?

The description opens with a specific verb and resource: 'Get the current Metadata AI credit balance for the account this token belongs to.' It clearly differentiates this from related siblings like get_credit_transactions and get_payment_status by focusing on the current balance. The purpose is unambiguous.

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?

A dedicated 'WHEN TO USE THIS TOOL' section lists concrete triggers: after an OUT OF CREDITS failure, to confirm a top-up, when the user asks about balance, and before a long batch of calls. It also gives explicit anti-guidance, telling the agent to poll every 20-30 seconds rather than spin after a top-up. This is exemplary usage guidance.

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