Skip to main content
Glama

purchase_esim

Idempotent

Charge the wallet and issue an eSIM, no checkout. client_ref (1–64 chars) is your own reference for this purchase and makes the call idempotent: a retry with the same value returns the existing order without a second charge, so reuse it after a timeout and never invent a new one for the same purchase. period_num (1–365, default 7) only for daily_unlimited plans; the charge is price × days. topup_iccid with a plan_id from list_topups tops up an eSIM. Returns the order (status paid) with order_url; poll get_order(token) for ready and the activation code. A 402 is a short balance: create_deposit first. A wallet pays for at most 50 orders in 24 hours (429 beyond that; a retry answered from client_ref does not count). Needs the wallet code.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoen
emailNo
plan_idYes
client_refYes
period_numNo
topup_iccidNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / plan_id / maximum
      Added value: +2147483647
    • addedInput schema / properties / plan_id / minimum
      Added value: +1
  2. First observed

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the idempotentHint annotation, the description explains the full idempotency behavior, charging semantics, rate limits, error codes, and prerequisites. It also says what the response contains and how to advance the flow, which is valuable behavioral context.

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?

The description is dense but every sentence earns its place. It front-loads the core purpose and then delivers essential operational details without filler. The flow from idempotency to pricing to topup to error handling is logical and efficient.

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 purchase operation with zero schema descriptions, this definition covers prerequisite wallet code, idempotency, pricing, topup behavior, error handling, rate limits, and post-purchase polling. The output schema handles return shape details, so the description is complete.

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 description coverage is 0%, so the description carries the burden. It adds strong semantics for client_ref, period_num, and topup_iccid, including validation ranges and idempotency meaning. However, plan_id, lang, and email are not explicitly described, leaving minor gaps.

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+resource: 'Charge the wallet and issue an eSIM, no checkout.' It clearly differentiates itself from sibling tools like create_checkout and create_deposit by positioning purchase_esim as the direct purchase path.

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?

The description gives explicit guidance on when to use alternatives: use create_deposit on a 402, poll get_order for activation, and use list_topups for topups. It also tells the agent to reuse client_ref on retries, which is a clear procedural rule.

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