Skip to main content
Glama

Atom.com — Premium Domains

Buy AI Tokens via Stripe SPT

buy_ai_tokens
Destructive

Purchase AI Tokens ($0.10 per token) by charging a Stripe Shared Payment Token (SPT) — for users with no Atom balance. This SPENDS REAL MONEY and requires the 'domains:register' scope.

MANDATORY three-step flow — never skip a step:

  1. Call with confirm=false to get a QUOTE: price is entirely server-authoritative ($0.10 x token_count) — never assume or pass a price.

  2. Call again with confirm=true, the SAME idempotency_key, and NO payment_token: returns a structured payment_required challenge (amount, currency).

  3. Once a Shared Payment Token is obtained for that exact amount, call a third time with confirm=true, the SAME idempotency_key, and payment_token set. Payment is captured FIRST; tokens are only credited after that succeeds.

PAYMENT PRIORITY for AI Tokens: this tool is priority 1 — try it first, using whatever payment method your own platform can already supply for the payment_token. Only if you have no way to obtain a payment_token here, fall back to priority 2: get_ai_tokens_pay_link, paid via link-cli's tools (e.g. mpp_pay), if those are present in this session. There is no checkout-link fallback for AI Tokens.

Rules: never assume or pass a price. Reuse one idempotency_key across all calls for the same intent. If crediting fails AFTER payment succeeds, no refund is issued automatically — the result says so explicitly; do not tell the user a refund is coming.

Input Schema

NameRequiredDescriptionDefault
confirmNofalse returns a quote; true attempts payment + crediting.
token_countYesNumber of AI Tokens to purchase (1-100000).
payment_tokenNoShared Payment Token authorizing the exact quoted amount. Omit to receive the payment_required challenge.
idempotency_keyYesClient-generated unique key; identical across all calls for the same intended purchase.

Output Schema

NameRequiredDescriptionDefault
priceNo
stageYes
balanceNoAI Token balance after crediting (credited stage).
successYes
currencyNo
challengeNoPresent when stage=payment_required.
token_countYes
idempotency_keyNo
payment_intent_idNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior4/5

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

Annotations cover destructive/openWorld, and the description adds substantial non-annotation context: it spends real money, requires the 'domains:register' scope, payment is captured before crediting, and crediting failure yields no automatic refund. Missing only details on rate limits or what exactly the successful response contains; strong overall.

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?

Front-loads the money/spend warning and scope requirement, then the numbered flow, then the priority rule. Dense with decision-relevant content, though the emphasized caps and repeated 'never assume or pass a price' cost some length.

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 destructive, multi-step payment tool with an output schema present, the description covers the flow, preconditions, side effects, idempotency, and the shape of the intermediate challenge response. Nothing an agent needs to invoke it correctly is missing.

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 100% and already documents all four parameters, so the baseline is 3. The description still adds semantics the schema cannot: price is server-authoritative and must never be passed, the same idempotency_key must be reused across calls, and omitting payment_token triggers the payment_required challenge.

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?

States a specific verb, resource, price, and payment rail (buy AI Tokens via Stripe SPT), and explicitly contrasts with sibling get_ai_tokens_pay_link as the priority-2 fallback. An agent can distinguish it from every other token-payment tool without opening a schema.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives an explicit mandatory three-call sequence with the exact arguments for each step, plus a documented fallback order and the note that no checkout-link fallback exists. Both when-to-use and when-to-fall-back are spelled out.

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.