Skip to main content
Glama

Buy credits

create_topup_checkout

Open a Stripe Checkout to buy a credit pack.

credits is 10000, 20000, 50000, or 100000, at $1 per 1,000 credits. The default is 10000 ($10). amount is a whole number of dollars from 10 to 1000, at the same rate, when the amount is not one of those packs. Pass credits or amount, not both. Returns a Checkout URL and a session id. Pass that id to get_topup_status. Each call creates a new session.

Talk to the user in plain words: no tool, parameter or field names. Say "the American Spend model", never "panel" or a data source.

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": "create_topup_checkout"
  }
}

Input Schema

NameRequiredDescriptionDefault
amountNoA whole number of dollars from 10 to 1000, at $1 per 1,000 credits. Use this instead of credits.
creditsNoCredits to buy, at $1 per 1,000. One of 10000, 20000, 50000, 100000. Defaults to 10000 ($10).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / amount
      Added value: +{
      +  "description": "A whole number of dollars from 10 to 1000, at $1 per 1,000 credits. Use this instead of credits.",
      +  "maximum": 1000,
      +  "minimum": 10,
      +  "type": "integer"
      +}
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, openWorldHint=true, idempotentHint=false), the description discloses that every invocation spins up a new session, that the call returns a Checkout URL plus a session id, and what that id is used for. It does not cover what happens to abandoned sessions or whether payment method is required, but the non-idempotent, externally-visible nature of the call is made explicit.

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 operational core is front-loaded in the first sentence, with pricing, exclusivity rule, return value, and follow-up tool each given one short sentence. The closing paragraph about plain-language phrasing is a useful style constraint but is not about invoking this tool, so it is mild padding.

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, and the description compensates by naming the return values (Checkout URL, session id) and the tool that consumes them. Combined with defaults, pricing, the either/or rule, and the non-idempotency note, an agent has everything needed to call this correctly on the first try.

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 already 100%, so the baseline is 3, but the description adds genuine meaning: the shared $1-per-1,000-credits rate, the pack tiers, the default value, and the mutual-exclusivity rule between credits and amount. That mutual-exclusivity constraint is the key calling decision and is stated in prose, not just implied by the schema.

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 names a specific verb and resource — opening a Stripe Checkout to buy a credit pack — which an agent can immediately distinguish from the sibling create_upgrade_checkout (plan change, not credits). It also scopes the operation to credit packs and names the follow-up tool, so the intent is unambiguous.

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 concrete operating rules: pass credits or amount but not both, the default is 10000, and the resulting session id must be handed to get_topup_status. It also warns that each call creates a new session, implicitly telling the agent not to retry casually. It stops short of explicitly stating when to prefer a credit pack over the sibling upgrade flow.

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.