Skip to main content
Glama

get_credits

The account's balance, as the web app's wallet shows it: what is left, the plan, and who pays for the next study. For a member of an organization that pays for its studies, also the organization's credits left this month. Free. Use it before a large study, or after an insufficient_funds error.

Returns: { unit, balance_credits, credits_expiring (credits that will expire, soonest first), plan, billed_to ('wallet' | 'org'), billed_org_name, organization (its credits this month: included, used, remaining, level), spend_paused, payment_overdue, card_required, credit_line_reached, weekly_free (Free plan: the weekly credits and when they reset), plan_unpaid, top_up_url }. payment_overdue is present when the organization that pays has an overdue invoice: { state ('scheduled' | 'paused'), pause_at, can_pay }. card_required is present when that organization has no card on file and its agreement requires one: { state, pause_at }. credit_line_reached is present when that organization is paused at its credit line: { state, reason }. While scheduled, studies run until pause_at; tell the user an org admin should pay, or save a card, in the organization portal.

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the entire burden and does so well: it enumerates conditional return fields, explains that payment_overdue/card_required/credit_line_reached appear only in specific org states, and clarifies that 'while scheduled, studies run until pause_at' with a directive to tell the user to pay or save a card. These are non-obvious behavioral and remediation details an agent could not infer elsewhere.

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?

Front-loads purpose and usage in two short sentences before the return-field block, and every sentence earns its place by naming a field or a conditional state. The dense parenthetical field list is long but is genuine specification rather than 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?

There is no output schema, so the description must document the return shape, and it does so thoroughly, including conditional-field presence rules and the actionable 'pay or save a card in the organization portal' instruction. Nothing an agent needs to interpret the response or act on it 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 takes zero parameters, so the baseline is 4; there is nothing for the description to disambiguate. The description instead spends its budget on return-value semantics, which is the right use of space for a no-arg tool.

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 resource ('the account's balance') with concrete scope ('what is left, the plan, and who pays for the next study') and adds organization-credit behavior for org members. It is clearly distinguishable from the cost-estimation sibling preview_cost by framing itself as the balance/wallet view.

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?

Gives explicit triggering contexts: 'before a large study, or after an insufficient_funds error', plus the useful note that it is Free. It does not name a sibling alternative (e.g., preview_cost) for the pre-study case, so routing is clear but not fully comparative.

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