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:authorize'.

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/5.0
Behavior4/5

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

Beyond annotations, the description discloses important behavioral context: the tool returns a Stripe Checkout URL, payment is completed by a human who accepts terms there, credit is granted once after Stripe confirms payment, and the caller needs the 'billing:authorize' scope. These details materially help the agent understand the asynchronous, human-in-the-loop nature of the call. It does not cover the test-payment rail or idempotency behavior, which are left to schema descriptions.

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 concise sentences, front-loaded with the action and return value, followed by the payment confirmation behavior and the scope requirement. Every sentence adds distinct information with no repetition.

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

Completeness3/5

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

For a payment-related mutation with seven parameters, two rails (checkout vs test_payment_method), idempotency keys, and no output schema, the description covers the main checkout flow and scope but omits important operational details. It does not explain the test rail, idempotency semantics, amount bounds, or what accept_terms and customer require in practice. It is minimally adequate but leaves gaps given the tool's complexity.

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 is expected to compensate. It mentions a human payer and terms acceptance but does not meaningfully explain parameters such as amount_cents, client_purchase_key, idempotency_key, rail, customer, accept_terms, or test_payment_method. The parameter meaning is almost entirely 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 verb and resource: 'Buy prepaid credit', and immediately clarifies the return value ('Stripe Checkout URL') and the human payer role. This clearly distinguishes it from siblings such as get_credit_purchase (retrieval) and other purchase tools like buy_plan_period or buy_board_pass.

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 establishes the core usage context: buying prepaid credit via a Stripe Checkout flow that a human payer must complete. It also names a required scope. However, it does not explicitly contrast when to choose this over buy_plan_period, submit_x402_payment, or other purchase siblings, nor does it state exclusions.

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