Skip to main content
Glama

Buy a travel eSIM

buy_esim
Idempotent

Starts the purchase of one eSIM plan for the customer and returns a payment link. Pay it with the Machine Payments Protocol (HTTP 402, Stripe shared payment token) to complete the order. Before calling, confirm the plan, the price and the email with the customer, and get their agreement to the terms: By buying, the customer asks for the eSIM to be sent at once and accepts the terms (https://inboxesim.com/terms): the 14-day right to withdraw ends once the eSIM is installed. An eSIM that was never installed or used can be refunded within 30 days from its order page, less the payment fee (no card fee within 14 days in the EU and UK).

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>",
      "customer_agreed_to_terms": "<customer_agreed_to_terms>"
    },
    "name": "buy_esim"
  }
}

Input Schema

NameRequiredDescriptionDefault
plan_idYesA plan_id from find_esim_plans, e.g. 'japan-5gb-30d'.
customer_emailYesWhere the QR code and install link are sent.
customer_agreed_to_termsYestrue only if the customer accepted the terms quoted in this tool's description.

Output Schema

NameRequiredDescriptionDefault
planYes
statusYes
messageNo
page_urlNo
amount_usdNo
how_to_payNo
payment_linkNoPOST here and answer the HTTP 402 challenge.
browser_fallbackNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.2/5.0
Behavior5/5

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

Beyond the annotations, the description explains that the call returns a payment link, how payment completes the order, and the legal/refund consequences tied to installing or not installing the eSIM. These are important behavioral details for an agent handling a real purchase.

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?

The description is front-loaded with the core action and return value, then covers payment and consent requirements. The legal/refund sentence is dense but earns its place because it directly supports the required terms-agreement parameter.

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 an output schema and rich annotations, the description covers the key action, payment flow, consent requirement and refund caveats. The main missing context is the relationship to the sibling make_esim_cart alternative.

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%, so the three parameters are already documented. The description adds meaningful context for customer_agreed_to_terms by quoting the terms and explaining the withdrawal/refund consequences that consent entails.

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 specific verb and resource: it starts the purchase of one eSIM plan and returns a payment link. That is clear enough for an agent to understand the operation, but it does not explicitly distinguish this direct-buy path from the sibling make_esim_cart 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 pre-call conditions: confirm the plan, price and email with the customer, and obtain agreement to the terms. However, it does not state when an agent should use this tool instead of make_esim_cart or how those two purchase paths relate.

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