Skip to main content
Glama

Create credit purchase

create_credit_purchase

Buy prepaid credit: returns a Stripe Checkout URL for a human payer, who accepts the customer terms there. Credit is granted once, after Stripe confirms payment. Requires scope 'billing:checkout'.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "amount_cents": "<amount_cents>",
      "client_purchase_key": "<client_purchase_key>"
    },
    "name": "create_credit_purchase"
  }
}

Input Schema

NameRequiredDescriptionDefault
railNocheckout
customerNoRequired for rail=checkout.
accept_termsNo
amount_centsYes
idempotency_keyNoOptional. Same key + same arguments within 24 h returns the original result.
client_purchase_keyYesDurable key; a retry returns the same purchase.
test_payment_methodNorail=test_payment_method only (TEST mode).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior5/5

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

The description adds substantial behavior beyond the annotations: it returns a Stripe Checkout URL, requires a human payer, routes terms acceptance through Stripe, grants credit only after Stripe confirms payment, and requires a specific scope. These are critical operational details for an open-world purchase tool.

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 compact sentences with the core action and constraints front-loaded. Every sentence adds useful information about the purchase flow, payment confirmation, and required scope.

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?

For a purchase tool with no output schema, the description adequately explains the returned Checkout URL and when credit is granted. It still omits parameter-level guidance and retry behavior, though retry semantics are partly covered by schema descriptions.

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

Parameters2/5

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

Schema description coverage is only 57%, so the description needs to compensate but largely does not. It mentions a human payer and terms acceptance, but leaves amount_cents, rail, accept_terms, and most parameter usage unexplained. The parameter meaning is mostly left to 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 states a specific action and resource: 'Buy prepaid credit.' It also clarifies the mechanism ('returns a Stripe Checkout URL for a human payer') and the grant timing, which distinguishes it from get_credit_purchase and authorize_credit_spending.

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 context for use: prepaid credit purchase via a human payer who accepts terms, and notes the required scope 'billing:checkout.' It does not explicitly name alternatives or when not to use it, but the buying context is unambiguous.

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