Skip to main content
Glama

Get account balance

get_credits
Read-only

Check the authenticated account's US-dollar balance and plan before running agents to confirm enough prepaid credit.

Instructions

Get the authenticated account's US-dollar balance and plan. Running agents spends this prepaid balance, so check it before invoking. For where the money went, use get_usage instead. balance_usd is the dollar-formatted balance.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
packsYesCredit packs this account can buy. Each pack's usd_cents is its price in US cents and its credits are what the purchase adds to balance.
plansYesSubscription plans on offer, with their monthly credit grant.
limitsYesThe caps this account's plan tier enforces.
balanceYesThe account's remaining prepaid balance, in credits. 1,000,000 credits = 1 US dollar.
user_idYesThe identifier of the account this balance belongs to.
audienceYes
plan_tierYesThe plan tier this account resolves to: free, pro or power. An account with no active plan is free.
active_planYesThe account's current subscription, or null when it has none and is on the free tier.
balance_usdYesThe account balance formatted in US dollars, without a currency symbol.
account_emailYesThe email address of the account this balance belongs to.
can_manage_billingYes
low_credit_thresholdYesThe balance, in the same credits, below which this account is warned it is running low.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.16.0
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "account_email": {
      +      "description": "The email address of the account this balance belongs to.",
      +      "type": "string"
      +    },
      +    "active_plan": {
      +      "additionalProperties": false,
      +      "description": "The account's current subscription, or null when it has none and is on the free tier.",
      +      "properties": {
      +        "cancel_at_period_end": {
      +          "type": "boolean"
      +        },
      +        "current_period_end": {
      +          "type": [
      +            "null",
      +            "string"
      +          ]
      +        },
      +        "monthly_credits": {
      +          "description": "Credits this plan adds each month, in the same credits as balance.",
      +          "type": "integer"
      +        },
      +        "sku": {
      +          "type": "string"
      +        },
      +        "status": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "sku",
      +        "monthly_credits",
      +        "status",
      +        "current_period_end",
      +        "cancel_at_period_end"
      +      ],
      +      "type": [
      +        "null",
      +        "object"
      +      ]
      +    },
      +    "audience": {
      +      "type": "string"
      +    },
      +    "balance": {
      +      "description": "The account's remaining prepaid balance, in credits. 1,000,000 credits = 1 US dollar.",
      +      "type": "integer"
      +    },
      +    "balance_usd": {
      +      "description": "The account balance formatted in US dollars, without a currency symbol.",
      +      "type": "string"
      +    },
      +    "can_manage_billing": {
      +      "type": "boolean"
      +    },
      +    "limits": {
      +      "additionalProperties": false,
      +      "description": "The caps this account's plan tier enforces.",
      +      "properties": {
      +        "max_active_workflows": {
      +          "description": "How many active workflows this plan tier may have. 0 means unlimited. An anonymous trial cannot activate a workflow at all.",
      +          "type": "integer"
      +        },
      +        "max_agents": {
      +          "description": "How many agents this plan tier may own. 0 means unlimited. An anonymous trial is capped at one agent whatever this says.",
      +          "type": "integer"
      +        },
      +        "max_concurrent_runs": {
      +          "description": "How many agent runs this plan tier may have in flight at once. 0 means unlimited.",
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "max_agents",
      +        "max_concurrent_runs",
      +        "max_active_workflows"
      +      ],
      +      "type": "object"
      +    },
      +    "low_credit_threshold": {
      +      "description": "The balance, in the same credits, below which this account is warned it is running low.",
      +      "type": "integer"
      +    },
      +    "packs": {
      +      "description": "Credit packs this account can buy. Each pack's usd_cents is its price in US cents and its credits are what the purchase adds to balance.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "credits": {
      +            "type": "integer"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "usd_cents": {
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "usd_cents",
      +          "credits"
      +        ],
      +        "type": "object"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "plan_tier": {
      +      "description": "The plan tier this account resolves to: free, pro or power. An account with no active plan is free.",
      +      "type": "string"
      +    },
      +    "plans": {
      +      "description": "Subscription plans on offer, with their monthly credit grant.",
      +      "items": {
      +        "additionalProperties": false,
      +        "properties": {
      +          "id": {
      +            "type": "string"
      +          },
      +          "monthly_credits": {
      +            "type": "integer"
      +          },
      +          "usd_cents": {
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "usd_cents",
      +          "monthly_credits"
      +        ],
      +        "type": "object"
      +      },
      +      "type": [
      +        "null",
      +        "array"
      +      ]
      +    },
      +    "user_id": {
      +      "description": "The identifier of the account this balance belongs to.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "balance",
      +    "low_credit_threshold",
      +    "packs",
      +    "plans",
      +    "active_plan",
      +    "can_manage_billing",
      +    "audience",
      +    "user_id",
      +    "account_email",
      +    "plan_tier",
      +    "limits",
      +    "balance_usd"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv0.3.0
    • addedInput schema / properties
      Added value: +{}
  3. First observedv0.1.0

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuinely useful behavioral context beyond that: the balance is prepaid and consumed by running agents. It stops short of describing freshness/latency or update cadence, so not a full 5.

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 tight sentences, front-loaded with the core purpose, followed by the 'why check' motivation and the alternative-tool routing. Every sentence earns its place with no filler.

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?

For a zero-parameter read tool with an output schema present, the description needs only purpose, usage context, and routing to alternatives, all of which it supplies. Nothing an agent needs to invoke it correctly 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 does mention balance_usd, but that refers to a return field already covered by the output schema, not a parameter, so there is no additional parameter meaning to convey.

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 (Get) and resource (authenticated account's US-dollar balance and plan), and explicitly distinguishes itself from the sibling get_usage. An agent can tell this apart from other read tools without opening the 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 when-to-use ('check it before invoking' since running agents spend the balance) and names the alternative tool plus the condition that selects it ('For where the money went, use get_usage instead'). Nothing is left to inference.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.