Skip to main content
Glama

Prepare an eSIM plan for purchase

prepare_purchase

Return the exact price of a selected eSIM plan for a signed-in user, using wallet or card payment, without creating an order or charging anything.

Instructions

Prepare a signed-in user's chosen plan for buying, and report exactly what it would cost. This does NOT buy anything: it creates no order, moves no money, and reserves nothing. WHEN: a signed-in user has picked a real plan from a list you showed and wants to go ahead -- "I want the second one", "prepare the cheapest France plan". FIRST: the user must be signed in. Check get_login_status and run the normal login conversation if they are not. Then ask whether they want to use their wallet balance or a card, and pass their answer -- never pick for them. Pass the bundle_code of the plan they chose, taken from the catalogue result you already have. Never invent a code and never ask the user for one. If it is unclear which plan they mean, ask them which one before calling this. The plan's price, availability and the wallet balance are all re-read from the platform here, so you cannot supply them and must not assume them. AFTER SUCCESS: tell the user the plan, the amount and the payment method, and say plainly that no order was created and nothing was charged. Never say the plan is reserved, held or bought. Do not ask for card details. Do not call this again for the same choice -- if you do, the earlier quote is replaced. Preparing is not paying, and this tool cannot take a payment of either kind. Only once the user has heard the amount and explicitly agreed to it does paying begin: confirm_purchase for a Wallet quote, create_card_checkout for a Card quote. Never start either on your own initiative.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
localeNoOptional language tag for platform text, e.g. 'en'. Omit to use the server default.
regionNoOptional. The region whose plan list the user chose from, when the selection came out of a region search. Preserves the destination context; it never affects the price.
countryNoOptional. The country whose plan list the user chose from, in their own words, when the selection came out of a country search. Preserves the destination context; it never affects the price.
currencyNoOptional ISO-4217 currency code, e.g. 'USD'. Omit to use the server default.
bundle_codeYesThe bundle_code of the plan the user chose, taken verbatim from a catalogue result you already have in this conversation. Never invent, guess or edit one, never derive one from a plan's display name, and never ask the user to read one out. If you do not have the code for the plan they mean, search the destination again and use the code from the option they picked.
payment_methodYesHow the user wants to pay: 'Wallet' to use their eSIM account balance, or 'Card'. Ask the user which one they want and pass their answer -- never choose on their behalf, and never default to one.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Even with annotations present, the description adds substantial behavioral context: it creates no order, moves no money, reserves nothing, replaces the earlier quote if called again, re-reads price/availability/balance from the platform, and must never imply the plan is reserved or bought. No contradiction with the annotations exists; the openWorldHint aligns with the re-reading behavior.

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?

Though long, the description is tightly structured with clear sections: WHAT, WHEN, FIRST, AFTER SUCCESS, and boundary statements. Every paragraph covers a distinct operational concern, and the opening sentence front-loads the core purpose. No filler sentences are present.

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?

Given the tool's complexity, 6 parameters, output schema, and a web of related sibling tools, the description fully covers prerequisites, side effects, follow-up actions, and post-success messaging. It leaves no meaningful gap for an agent deciding when and how to invoke this tool.

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?

The schema already documents all six parameters with 100% coverage, so the baseline is 3. The description adds genuine value by insisting bundle_code must come verbatim from a catalogue result and never be invented or asked from the user, plus clarifying that region/country preserve context but never affect price. This goes beyond the schema's already-rich parameter docs.

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 opens with a precise verb+resource statement: prepare a signed-in user's chosen plan for buying and report its cost, while explicitly clarifying that it does NOT buy anything. It clearly distinguishes this from confirm_purchase and create_card_checkout by stating those are the actual paying steps.

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 when-to-use context ('a signed-in user has picked a real plan... and wants to go ahead'), prerequisites (must check get_login_status), and directly names the alternatives: confirm_purchase for Wallet and create_card_checkout for Card. It also tells the agent not to call this again for the same choice and not to start payment on its own.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/samah-jamal-monty/esim-opensource-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server