Skip to main content
Glama

purchase_esim

Destructive

Purchase a DATA eSIM. Deducts from your prepaid agent wallet and returns order details with activation info (ICCID, QR code, SM-DP+). Use the packageCode from search_esim_packages. For a daily-reset "Unlimited" plan, also pass days (the number of days to buy). For phone-number eSIMs use purchase_phone_plan instead. Requires an agent-wallet API key (ak_live_).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoONLY for daily-reset "Unlimited" plans (get_package_details shows "Type: Daily unlimited"): the number of days to purchase. Valid values: 3, 5, 7, 10, 15, 30. Required for those plans, and the total charged is the per-day price times this many days (minus a duration discount). Omit for fixed-data plans.
promoCodeNoOptional promo/discount code. Validated server-side; an invalid code rejects the order with the reason (nothing is charged). Only pass a code the user explicitly provided.
requestIdNoIdempotency key: generate a fresh UUID for each NEW purchase, and reuse the SAME value when retrying after a timeout or transport error — an identical retry returns the original order instead of charging again.
packageCodeYesThe data-eSIM package code shown in [brackets] by search_esim_packages or get_package_details (e.g. P6ZMSDS1G). Phone-plan codes are not valid here; use purchase_phone_plan for those.

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, readOnlyHint=false, and idempotentHint=false. The description adds meaningful context by stating it deducts from the prepaid agent wallet, returns order details with activation info (ICCID, QR, SM-DP+), and requires an ak_live_ API key. No contradiction with annotations.

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?

Four sentences, front-loaded with the primary purpose. It efficiently covers core usage, the special case for unlimited plans, the alternative for phone-number eSIMs, and a key prerequisite. Slight lack of structured formatting, but no wasted words.

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 four parameters and no output schema, the description adequately covers purpose, side effects (wallet deduction), return contents (ICCID, QR, SM-DP+), and usage exceptions. Schema handles parameter details, making this sufficiently complete for an agent to invoke correctly.

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 description coverage is 100%, with each parameter fully documented in the schema. The description adds a high-level pointer to search_esim_packages and the days condition, but this mostly reiterates schema content. Baseline 3 is appropriate since the schema handles parameter semantics.

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 clearly states the primary action ('Purchase a DATA eSIM') and identifies the specific resource. It distinguishes itself from sibling tools by explicitly naming purchase_phone_plan for phone-number eSIMs and emphasizing data-only packages. The inclusion of wallet deduction and activation info further clarifies the tool's purpose.

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 provides explicit when-to-use guidance: for data eSIMs using packageCode from search_esim_packages, and for daily-reset 'Unlimited' plans requiring a days parameter. It also names the alternative tool (purchase_phone_plan) for phone-number eSIMs and mentions the required agent-wallet API key type. This gives clear context for tool selection.

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.

TDQS

A3.9/5.0
Disambiguation3/5

There is notable overlap between search tools (search, search_esim_packages, search_phone_plans) and detail tools (fetch, get_package_details, get_pricing, get_phone_plan_pricing). While descriptions clarify some differences, agents may struggle to pick the right tool without careful reading, especially between 'search' and 'search_esim_packages' and between 'fetch' and 'get_package_details'.

Naming Consistency4/5

Most tools follow a clear verb_noun convention (e.g., purchase_esim, list_orders, get_balance). A few are single verbs like 'fetch' and 'search', which stand out but are still recognizable as actions. Overall the pattern is predictable and readable.

Tool Count2/5

With 31 tools, this is a large set. The server covers several distinct sub-domains (eSIM data, phone-number eSIM, SMS verification, SMS rentals, wallet management), which justifies some size, but the count is on the high side and could be consolidated (e.g., merging search tools or detail-fetching tools).

Completeness4/5

The tool surface covers the full lifecycle for each product line: search, view details, purchase, list, check status, top-up/cancel, plus wallet management. The only minor gap is a lack of explicit update tools (e.g., changing a phone plan), but core workflows are well supported.

Resources