Skip to main content
Glama

Browse or buy eSIM top-ups

topup_esim
Destructive

Add data to an existing eSIM by listing compatible top-ups with prices, or purchase an approved top-up charged to your balance.

Instructions

Add data to an existing eSIM. Without topup_product_id: lists compatible top-ups with prices (no charge). With topup_product_id: buys that top-up, charged to your balance immediately; requires max_price_cents (the top-up price you showed the user and they approved).

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": {
      "esim_id": "<esim_id>"
    },
    "name": "topup_esim"
  }
}

Input Schema

NameRequiredDescriptionDefault
esim_idYesesim_... id of the eSIM to top up
max_price_centsNoRequired with topup_product_id: the top-up price you showed the user and they approved, in US cents. Refused uncharged if the price is higher.
topup_product_idNoprod_... id from the top-up list; omit to browse

Output Schema

NameRequiredDescriptionDefault
esimNo
topupsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv2.0.0
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
  2. Changed2 schema fields changedv1.2.1
    • addedInput schema / properties / max_price_cents
      Added value: +{
      +  "description": "Required with topup_product_id: the top-up price you showed the user and they approved, in US cents. Refused uncharged if the price is higher.",
      +  "exclusiveMinimum": 0,
      +  "maximum": 1000000,
      +  "type": "integer"
      +}
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "esim": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "activation_code": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "charged_price_cents": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "completed_at": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "countries": {
      +          "items": {
      +            "type": "string"
      +          },
      +          "type": "array"
      +        },
      +        "created_at": {
      +          "type": "string"
      +        },
      +        "currency": {
      +          "const": "USD",
      +          "type": "string"
      +        },
      +        "data_limit_gb": {
      +          "type": [
      +            "number",
      +            "null"
      +          ]
      +        },
      +        "data_unlimited": {
      +          "type": "boolean"
      +        },
      +        "expires_at": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "iccid": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "id": {
      +          "type": "string"
      +        },
      +        "is_topup": {
      +          "type": "boolean"
      +        },
      +        "parent_order_id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "product_id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "qr_code_url": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "routing_location": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "smdp_address": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "status": {
      +          "enum": [
      +            "processing",
      +            "completed",
      +            "cancelled",
      +            "refunded",
      +            "expired"
      +          ],
      +          "type": "string"
      +        },
      +        "validity_days": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "status",
      +        "product_id",
      +        "is_topup",
      +        "parent_order_id",
      +        "iccid",
      +        "activation_code",
      +        "qr_code_url",
      +        "smdp_address",
      +        "data_limit_gb",
      +        "data_unlimited",
      +        "validity_days",
      +        "countries",
      +        "routing_location",
      +        "charged_price_cents",
      +        "currency",
      +        "created_at",
      +        "completed_at",
      +        "expires_at"
      +      ],
      +      "type": "object"
      +    },
      +    "topups": {
      +      "items": {
      +        "additionalProperties": {},
      +        "properties": {
      +          "countries": {
      +            "items": {
      +              "type": "string"
      +            },
      +            "type": "array"
      +          },
      +          "country_count": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "currency": {
      +            "const": "USD",
      +            "type": "string"
      +          },
      +          "data_limit_gb": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "data_unlimited": {
      +            "type": "boolean"
      +          },
      +          "features": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "has_5g": {
      +                "type": "boolean"
      +              },
      +              "has_calls": {
      +                "type": "boolean"
      +              },
      +              "has_hotspot": {
      +                "type": "boolean"
      +              },
      +              "has_sms": {
      +                "type": "boolean"
      +              },
      +              "supports_topup": {
      +                "type": "boolean"
      +              }
      +            },
      +            "required": [
      +              "has_5g",
      +              "has_hotspot",
      +              "has_calls",
      +              "has_sms",
      +              "supports_topup"
      +            ],
      +            "type": "object"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "price_cents": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          },
      +          "region": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "routing_location": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "title": {
      +            "type": "string"
      +          },
      +          "validity_days": {
      +            "maximum": 9007199254740991,
      +            "minimum": -9007199254740991,
      +            "type": "integer"
      +          }
      +        },
      +        "required": [
      +          "id",
      +          "title",
      +          "countries",
      +          "region",
      +          "country_count",
      +          "routing_location",
      +          "data_limit_gb",
      +          "data_unlimited",
      +          "validity_days",
      +          "features",
      +          "price_cents",
      +          "currency"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    }
      +  },
      +  "type": "object"
      +}
  3. Changed4 schema fields changedv1.1.8
    • addedInput schema / properties / esim_id / description
      Added value: +"esim_... id of the eSIM to top up"
    • addedInput schema / properties / esim_id / pattern
      Added value: +"^(?:esim_[A-Za-z0-9_-]{1,64})$"
    • addedInput schema / properties / topup_product_id / description
      Added value: +"prod_... id from the top-up list; omit to browse"
    • addedInput schema / properties / topup_product_id / pattern
      Added value: +"^(?:prod_[A-Za-z0-9_-]{1,64})$"
  4. First observedv1.1.3

TDQS

A4.6/5.0
Behavior4/5

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

Annotations already declare destructive=true, non-idempotent and open-world, so the safety bar is partly covered; the description still adds real value by saying purchases are charged to balance immediately and that browsing is uncharged. It does not address whether a completed top-up can be reversed or refunded, which is the main remaining behavioral question for a destructive write.

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?

Three tight sentences, front-loaded with the core action and then the two modes. The mode contrast is delivered in parallel structure with zero filler.

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?

With an output schema present, return values need no explanation, and the description fully covers both call modes, the charging model, and the price guard. Missing only edge-condition context such as whether the eSIM must already be active/installed or what happens if a top-up fails mid-purchase.

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 baseline is 3; the description goes beyond it by explaining that topup_product_id's absence is itself the mode switch and that max_price_cents must carry the user-approved price. That is workflow meaning the schema alone only partly conveys.

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?

"Add data to an existing eSIM" names a specific verb and resource, and the two-mode split (no topup_product_id = list, with topup_product_id = buy) makes the tool's dual behavior unambiguous. An agent can tell exactly what will happen in each call without opening the schema.

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?

It states the selection rule explicitly: omit topup_product_id to browse compatible top-ups, include it to purchase. It also gives the prerequisite (max_price_cents must reflect a price the user saw and approved) and notes browsing is free, leaving nothing to inference.

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