Skip to main content
Glama

Get account balance

get_credits
Read-only

Check your account's US-dollar balance and plan to avoid running agents without sufficient prepaid credits.

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?

The annotations already declare readOnlyHint=true, so the read-only nature is covered. The description adds useful context beyond the annotations: the balance is prepaid and is spent by running agents, making it important to check before invocation. This is valuable behavioral context for the caller.

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?

Four short sentences, each earning its place: identifying the resource, warning about prepaid spend, directing to the sibling for usage details, and clarifying a returned field. The critical usage guidance is front-loaded.

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-only balance check with an output schema present, the description covers the purpose, when to call it, what the balance represents, and how it differs from the closely related sibling. Nothing material 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 tool has zero parameters, so the input schema offers nothing to explain. The description adds relevant output field context by naming balance_usd and noting it is dollar-formatted, which helps the agent interpret results despite no parameters.

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 states a specific verb and resource: 'Get the authenticated account's US-dollar balance and plan.' It also distinguishes itself from the sibling get_usage by clarifying that get_credits is for checking balance, not for seeing where money went.

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?

The description explicitly tells the agent when to use this tool ('check it before invoking' agents that spend prepaid balance) and names the alternative for a different need: 'For where the money went, use get_usage instead.' This fully routes the agent between siblings.

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