Skip to main content
Glama

Buy credits

buy_credits
Destructive

Purchases credits using a payment method already saved from a prior Stripe Checkout session. Use this when an authenticated account is running low on credits and needs more to keep submitting runs or analyses, without a human re-entering card details. See GET /billing/pricing for the current per-credit price. Example: {"credits":100}

Input Schema

NameRequiredDescriptionDefault
api_keyNoYour API key from POST /api/v1/accounts. Required unless you are authenticated via an Authorization: Bearer token.
creditsYesNumber of credits to purchase.

Output Schema

NameRequiredDescriptionDefault
new_balanceYes
payment_statusYes
credits_purchasedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and openWorldHint=true, so the agent knows this is a real write operation. The description usefully adds that a previously saved Stripe payment method is required and points to GET /billing/pricing for the current per-credit cost, but it omits important financial-safety details such as irreversibility, refund behavior, and idempotency.

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 purpose, then usage context, a pricing pointer, and a minimal example. Every sentence is relevant, though the example sentence is slightly redundant given the schema's existing description of the credits field.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given a destructive billing tool with rich input-schema descriptions, an output schema, and explicit annotations, the description covers the essential prerequisites: authentication, a saved Stripe payment method, the use case, and where to check pricing. It is not fully complete because it lacks irreversibility or failure-mode context, but it is sufficient for an agent to understand the core invocation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so both the api_key and credits parameters are already documented in the input schema. The description adds only a simple example, {"credits":100}, and does not meaningfully enrich parameter semantics beyond what the schema provides.

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 opens with a specific verb and resource: 'Purchases credits using a payment method already saved from a prior Stripe Checkout session.' It is clearly a billing action, not a simulation, estimation, or analysis tool like the siblings, so an agent can distinguish it without opening the schema.

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?

It gives clear usage context: use when 'an authenticated account is running low on credits and needs more to keep submitting runs or analyses, without a human re-entering card details.' It does not state when not to use it, but the positive context is explicit enough to route correctly.

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