Skip to main content
Glama

Purchase an eSIM or US number

purchase

Start an eSIM plan checkout and get a Stripe payment link; after payment clears, the eSIM and QR code are emailed automatically. Use the returned order ID with get_activation to fetch the QR.

Instructions

Begin buying an eSIM plan. Returns a secure Stripe payment link the customer opens to pay with their own card; the eSIM + QR are emailed automatically once payment clears. Poll get_activation with the returned order_id to fetch the QR. Safe to retry with the same idempotency_key.

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": {
      "plan_id": "<plan_id>",
      "customer_email": "<customer_email>"
    },
    "name": "purchase"
  }
}

Input Schema

NameRequiredDescriptionDefault
plan_idYesThe plan_id (productId) to buy, from search_plans / get_quote.
customer_emailYesWhere the eSIM/QR is emailed after payment.
payment_methodNoNot used: payment happens on the hosted Stripe page via payment_url. Reserved for a future direct-charge path.
billing_countryNo
idempotency_keyNoGenerated if omitted. Reusing a key returns the first checkout instead of starting another.

Output Schema

NameRequiredDescriptionDefault
errorNo
statusYes
messageNo
order_idYes
idempotentNo
payment_urlNo
receipt_urlNo
idempotency_keyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.5

TDQS

A4.3/5.0
Behavior5/5

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

Beyond the annotations (readOnly=false, destructive=false, openWorld=true), it discloses the full lifecycle: no card data touches this call, the customer pays on a Stripe-hosted page, the eSIM/QR are emailed only after payment clears, and the QR must be fetched separately via get_activation. Idempotent retry semantics are spelled out, which is exactly the behavioral context an agent needs before retrying a payment-adjacent call.

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?

Four short, front-loaded sentences: purpose first, then the payment/email mechanic, then the follow-up polling step, then the retry rule. No filler and nothing out of order.

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 payment-initiating tool with an output schema, the description covers what matters: what is initiated, where payment happens, what the agent must do next, and that retries are safe. The remaining return-value details are handled by the output schema.

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 coverage is 80%, so the baseline is 3. The description reinforces idempotency_key behavior and references order_id for the follow-up call, but it adds nothing about billing_country and largely echoes what the schema already says about idempotency.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description states a concrete verb and resource — 'Begin buying an eSIM plan' — and clarifies the mechanic (hosted Stripe link, emailed eSIM/QR). It does not address the mismatch with its own title ('...or US number') or say how it differs from buy_numbers, leaving a small ambiguity about whether number purchases go through this tool.

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 operational context: payment happens on the hosted Stripe page, then you poll get_activation with the returned order_id, and retries with the same idempotency_key are safe. It stops short of explicit exclusions (e.g., which purchase path handles US numbers instead), so it is clear context without alternatives.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.