Skip to main content
Glama

Get Credit Balance

get_credit_balance
Read-only

Get the AI credit balance: what is left, what the plan includes, what came from rollover or top-ups, and when the allowance resets. Set includeHistory to also get where the credits went — per day and per feature. Use this for AI credits only; for plan limits across every category use get_usage_limits. Requires organization context. Read-only: plan, seat and top-up changes are not available through MCP by design — a human does those in the web app.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoFor includeHistory: how many days back to aggregate (default 30, max 365)
featureIdNoFor includeHistory: limit the aggregation to one feature ID
includeHistoryNoAlso return consumption per day and per feature (default false)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, the description states the read-only nature in words and explains that plan, seat, and top-up changes are unavailable through MCP by design. It also discloses that includeHistory changes the response to include consumption per day and per feature, which is valuable behavioral context.

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 sentences, front-loaded with the core purpose and result contents, followed by usage boundaries and an alternative. Every sentence adds information, and there is no filler or repetition of the title.

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 carries the burden of explaining what the caller gets back, and it does: balance remaining, plan inclusions, rollover/top-ups, reset time, and optional historical usage. It also covers when to use the tool, the alternative, and the organization-context prerequisite, making it complete for a read-only balance query.

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?

Schema coverage is 100%, so the baseline is 3; the description adds meaning by explaining that includeHistory controls the historical consumption view and by summarizing the returned categories. It does not deeply elaborate days/featureId beyond the schema, but the schema already documents those clearly.

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 AI credit balance') and enumerates exactly what the result covers: remaining credits, plan inclusions, rollover/top-ups, and reset timing. It also explicitly differentiates itself from the sibling get_usage_limits by scoping itself to AI credits only.

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?

It gives explicit when-to-use guidance ('Use this for AI credits only') and names the alternative for plan-wide limits ('for plan limits across every category use get_usage_limits'). It also notes the prerequisite of organization context and that mutations are intentionally out of scope.

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