Skip to main content
Glama

Buy credits with a machine payment

buy_credits

Buy a credit pack with a machine payment (Stripe MPP: card through a shared payment token, or stablecoin). No account or sign-in needed. Packs: starter_80 = 80 credits for $9.99; pack_200 = 200 credits for $24.99; pack_550 = 550 credits for $59.99; pack_1500 = 1500 credits for $149.99. Pay by card (Stripe Link shared payment token, the default) or by stablecoin (USDC on Tempo): set method. The first call returns a payment challenge (JSON-RPC error -32042). Pay it and call again with the credential in _meta. With no API key, a new workspace is created and its API key is returned once: store it and send it as Authorization: Bearer . With an API key or a signed-in account, the credits are added to that workspace. The first card or Link purchase from each payer gets 50% bonus credits.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
packYesWhich pack to buy: starter_80 (80 credits, $9.99), pack_200 (200 credits, $24.99), pack_550 (550 credits, $59.99), pack_1500 (1500 credits, $149.99).
methodNoHow to pay: card (Stripe Link shared payment token, the default) or stablecoin (USDC on Tempo).card

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
apiKeyYes
statusYes
balanceYes
serverUrlYes
bonusCreditsYes
creditsAddedYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.4/5.0
Behavior5/5

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

Beyond the annotations it discloses the two-step payment handshake (first call returns JSON-RPC error -32042, then re-call with the credential in _meta), the one-time return of an API key that must be stored and replayed as a Bearer token, and a 50% first-purchase bonus. These are exactly the operational traits an agent cannot infer from readOnlyHint=false / idempotentHint=false / openWorldHint=true.

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?

It is front-loaded correctly (purpose, then packs, then method, then flow, then bonus) and each sentence carries real information. The pack pricing table is repeated in both the description and the pack parameter schema, which is mild redundancy in an otherwise dense block.

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?

For a paid, non-idempotent, open-world purchase tool with an output schema, the description covers auth requirements, the payment challenge/retry cycle, workspace-key semantics, and the bonus condition. Nothing an agent needs before invoking is missing.

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 description coverage is 100% and the schema already documents pack, its pricing, the method enum, and the default. The description restates the pack tiers and the card/stablecoin meanings almost verbatim, adding negligible meaning beyond 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+resource ('Buy a credit pack') and even qualifies the payment channel ('machine payment'). It is trivially distinguishable from every sibling, most of which are read/quote/search tools, and pairs naturally with get_credit_balance as the read counterpart.

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 strong procedural context: no account or sign-in needed, credits land in the workspace tied to the API key, and card vs stablecoin selection. It never explicitly names an alternative (e.g. check get_credit_balance first) or states when-not to buy, so it stops short of a 5.

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