Skip to main content
Glama

Get credits (account balance in USD)

get_credits
Read-only

Retrieve the authenticated account's prepaid US-dollar balance, plan, limits, and available credit packs to verify funds before starting agent runs.

Instructions

Get the authenticated account's prepaid US-dollar balance (balance_usd formatted in dollars, balance in micro-US-dollars), plan, limits, and the plans and credit packs on offer. Runs are charged to this balance; a run that the balance cannot cover is refused with 402 when it starts. This tool only reads: the account owner buys credit or changes plan in the Plori web app (prices: https://plori.ai/pricing). It returns only the authenticated account's own balance, never the balance of an account that shares Workspaces with it.

Input Schema

NameRequiredDescriptionDefault

No arguments

Output 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.
audienceYesanon: an anonymous trial; registered_free: a registered account without an active subscription; subscribed: an account with an active subscription.
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_billingYesWhether this account has a billing portal to manage its subscription (it has, or had, a plan); false for an anonymous trial.
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. Changed3 schema fields changedv0.17.1
    • addedOutput schema / properties / audience / description
      Added value: +"anon: an anonymous trial; registered_free: a registered account without an active subscription; subscribed: an account with an active subscription."
    • addedOutput schema / properties / can_manage_billing / description
      Added value: +"Whether this account has a billing portal to manage its subscription (it has, or had, a plan); false for an anonymous trial."
    • changedOutput schema / properties / limits / properties / max_concurrent_runs / description
      Previous value: -"How many agent runs this plan tier may have in flight at once. 0 means unlimited."New value: +"How many agent runs this account may have in flight at once. Anonymous trials allow 2. All other accounts return 0 (unlimited)."
  2. 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"
      +}
  3. Changed1 schema field changedv0.3.0
    • addedInput schema / properties
      Added value: +{}
  4. First observedv0.1.0

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the readOnlyHint annotation: it restates the read-only nature in plain terms, discloses the 402 refusal behavior at run start, specifies that no purchase is possible through this tool, and constrains the result to the caller's own balance rather than any Workspace-sharing account.

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 dense sentences, front-loaded with the core purpose and payload, then scoping/charging behavior, then the read-only boundary. Every clause carries distinct information (units, 402, purchase path, isolation guarantee) 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 no-argument read tool with an output schema, the description supplies the safety profile, the charging/refusal model, and the account-isolation guarantee, so an agent can decide when to call it and interpret the result without further context.

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 usefully clarifies return-value units (balance_usd in dollars, balance in micro-US-dollars), though it does not need to document any input arguments.

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 authenticated account's balance) plus the full payload: balance in two units, plan, limits, and available plans/credit packs. It distinguishes itself from siblings like get_workspace_costs by explicitly scoping to the authenticated account and excluding accounts sharing Workspaces.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Explains the operational context (runs are charged to this balance, insufficient balance yields 402 at run start) and routes the write action elsewhere (buying credit or changing plan happens in the Plori web app, with a pricing URL). It gives clear when-context but no explicit when-not or naming of a sibling read tool for comparison.

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