Skip to main content
Glama

Top up an eSIM (spends balance)

topup_esim

Add a package to an existing eSIM. Two-step: first call returns the package name, cost, current balance and a generated idempotency_key; call again with confirm: true AND that idempotency_key to execute (a retry with the same key can never apply the top-up twice). Tell the user the cost before confirming.

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

Input Schema

NameRequiredDescriptionDefault
iccidYesICCID of the eSIM (19-20 digits)
confirmNoOmit to get a preview; pass true to execute
package_codeYesFrom get_topup_packages
idempotency_keyNoFrom the preview; required with confirm: true

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / idempotency_key
      Added value: +{
      +  "description": "From the preview; required with confirm: true",
      +  "maxLength": 200,
      +  "type": "string"
      +}
  2. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing the two-step preview/execute protocol, the exact preview payload (package name, cost, current balance, idempotency_key), and the retry-safety guarantee. The key-scoped idempotency claim does not contradict idempotentHint=false, since that hint describes repeat calls without a key — which is precisely why the key is demanded. A user-facing policy (state the cost first) is also surfaced.

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: what it does, how the two-step call works, then the user-facing obligation. The critical mechanic (execute requires confirm plus the key) is front-loaded and nothing is repeated from the schema verbatim beyond necessary framing.

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?

With no output schema, the description compensates by enumerating what the preview returns, which is exactly what an agent needs to construct the second call. For a money-spending two-phase tool this covers purpose, protocol, safety, and return shape.

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 baseline is 3; the description earns above that by explaining the dependency structure — confirm alone is a preview, and idempotency_key is only meaningful paired with confirm: true. That sequencing is the one thing the flat schema cannot express, though most individual parameter meanings are still left to the schema.

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?

States a specific verb and resource — 'Add a package to an existing eSIM' — which is unambiguously distinct from read-side siblings such as get_topup_packages and get_topup. The title's '(spends balance)' reinforces that this is the mutating, money-spending variant.

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?

Gives clear operational context: omit confirm to preview, then re-call with confirm: true plus the returned idempotency_key to execute, and tell the user the cost before confirming. It does not name an alternative tool or state when-not to use it, but the sibling set contains no competing top-up writer, so the context is effectively clear.

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.