Skip to main content
Glama

SimplySIM travel eSIMs

Apply a discount or referral code

apply_code

Optional. Applies a promo code or a friend's referral code the user gave you. One discount per order. Only use codes the user provided: repeated invalid codes are blocked.

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": {
      "basket_token": "<basket_token>",
      "code": "<code>"
    },
    "name": "apply_code"
  }
}

Input Schema

NameRequiredDescriptionDefault
codeYesThe code exactly as the user gave it.
basket_tokenYesThe basket_token returned by create_basket. Keep it private.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

Annotations only declare the operation is not read-only, not idempotent, not destructive, and closed-world. The description adds real business behavior on top: one discount per order, only user-supplied codes are acceptable, and repeated invalid attempts are blocked. What it does not clarify is whether a second code replaces the existing discount or fails, which matters for a non-idempotent mutation.

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?

Four short sentences, no redundancy, and the most decision-relevant framing ('Optional', one discount per order, only user-provided codes) is front-loaded. Every clause carries information an agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 is silent on what a successful call returns or how the basket changes, so the agent cannot tell whether it should re-fetch the basket afterward. For a simple two-parameter tool with full schema coverage this is a moderate gap rather than a blocking one.

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 coverage is 100% and the schema already explains both parameters, including 'exactly as the user gave it' and 'keep it private' for basket_token. The description reinforces the user-supplied constraint on code but adds no format, normalization, or casing guidance beyond the schema, so the baseline 3 applies.

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?

States a specific verb and resource: applies a promo or referral code to a basket, with the scope constraint 'one discount per order.' It does not name the sibling remove_code, so an agent must infer the pairing from the name alone, which keeps this just short of a 5.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Optional' plus 'only use codes the user provided' gives clear conditions for invocation and a hard prohibition on inventing codes. There is no explicit statement of the inverse case (when not to call) and no named alternative such as remove_code for undoing a discount, leaving that routing to inference.

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