Skip to main content
Glama

get_credits_usage

Read-only

Read-only: the user's credits for the current period as { used, available, total, periodStartDate, periodEndDate, oneTimeCreditsHoldback }. periodStartDate and periodEndDate bound the usage window: the billing period, or the last 30 days ending today when there is no active subscription. periodEndDate is not a renewal date: for when credits renew, or whether the plan ends instead, read the subscription (get_user_info: renewalDate, isPlannedForCancellation). For an account owner used is the period's grants minus the current balance, so credits left from earlier grants lower it; for exact spend use get_credits_spend_by_product with since = periodStartDate. For a team member used is their spend against their credit cap, and total is the cap (the owner's grants for the period when they have no cap). For the spendable balance right now use get_credits_balance; for what the credits were spent on use get_credits_spend_by_product. Takes no arguments.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "get_credits_usage"
  }
}

Input Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Beyond the readOnlyHint annotation, it explains the period window, the fallback to the last 30 days without an active subscription, and how `used` and `total` differ for account owners versus team members. It also warns that periodEndDate is not a renewal date, which prevents a likely misinterpretation.

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?

The description is front-loaded with the return shape and then layers in period and role-specific semantics. It is dense and somewhat long, but nearly every sentence resolves a real ambiguity, so the length is justified.

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 and no parameters, the description carries the full burden of explaining the return fields and their meanings. It covers the output structure, period boundaries, owner versus team-member interpretations, and explicit alternatives for adjacent questions.

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?

There are zero parameters, so the schema baseline is high, and the description correctly states that the tool takes no arguments. No additional parameter semantics are needed or missing.

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 read-only retrieval: the user's credits for the current period, and names the returned fields. It clearly distinguishes this from get_credits_balance and get_credits_spend_by_product by scope and purpose.

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 routing: use get_user_info for renewal date or cancellation status, get_credits_spend_by_product for exact spend or spend details, and get_credits_balance for the current spendable balance. These alternatives are tied to concrete conditions rather than vague suggestions.

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.