Skip to main content
Glama

Cancel SMS verification or rental

cancel_rental
DestructiveIdempotent

Cancel an SMS verification or number rental order to receive a full refund. Rentals can only be cancelled within 60 minutes of purchase; verifications before any SMS arrives.

Instructions

Cancel an SMS order and refund it in full. Verification (ver_...): only before any SMS arrives. Usually unnecessary - a verification that gets no SMS is refunded automatically when its window closes, and frequent cancellations can temporarily pause SMS purchasing. Long-term rental (ren_...): only within 60 minutes of purchase; after that it runs to its end date. The result shows the amount refunded.

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": {
      "rental_id": "<rental_id>"
    },
    "name": "cancel_rental"
  }
}

Input Schema

NameRequiredDescriptionDefault
rental_idYesver_... or ren_... id to cancel

Output Schema

NameRequiredDescriptionDefault
rentalNo
verificationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed3 schema fields changedv2.1.0
    • addedOutput schema / properties / rental / properties / messages / items / properties / content_withheld
      Added value: +{
      +  "type": "boolean"
      +}
    • changedOutput schema / properties / rental / properties / messages / items / properties / text / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / rental / properties / payment_due
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": {},
      +      "properties": {
      +        "amount_cents": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "since": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "amount_cents",
      +        "since"
      +      ],
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ]
      +}
  2. 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"
  3. Changed1 schema field changedv1.2.1
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": {},
      +  "properties": {
      +    "rental": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "auto_renew": {
      +          "type": "boolean"
      +        },
      +        "can_cancel": {
      +          "type": "boolean"
      +        },
      +        "cancel_window_expires_at": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "charged_price_cents": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "country": {
      +          "type": "string"
      +        },
      +        "created_at": {
      +          "type": "string"
      +        },
      +        "display_id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "duration": {
      +          "type": "string"
      +        },
      +        "expires_at": {
      +          "type": "string"
      +        },
      +        "id": {
      +          "type": "string"
      +        },
      +        "messages": {
      +          "items": {
      +            "additionalProperties": {},
      +            "properties": {
      +              "code": {
      +                "type": [
      +                  "string",
      +                  "null"
      +                ]
      +              },
      +              "id": {
      +                "type": "string"
      +              },
      +              "received_at": {
      +                "type": "string"
      +              },
      +              "text": {
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "id",
      +              "text",
      +              "received_at"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "next_renewal_price_cents": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "paid_until": {
      +          "type": "string"
      +        },
      +        "phone_number": {
      +          "type": "string"
      +        },
      +        "re_rent_available": {
      +          "type": "boolean"
      +        },
      +        "re_rent_blocked_at": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "re_rent_price_cents": {
      +          "anyOf": [
      +            {
      +              "maximum": 9007199254740991,
      +              "minimum": -9007199254740991,
      +              "type": "integer"
      +            },
      +            {
      +              "type": "null"
      +            }
      +          ]
      +        },
      +        "refunded_cents": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "rental_type": {
      +          "const": "rental",
      +          "type": "string"
      +        },
      +        "service_id": {
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "service_name": {
      +          "type": "string"
      +        },
      +        "status": {
      +          "enum": [
      +            "active",
      +            "expired",
      +            "cancelled"
      +          ],
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "status",
      +        "phone_number",
      +        "service_id",
      +        "service_name",
      +        "country",
      +        "duration",
      +        "rental_type",
      +        "charged_price_cents",
      +        "auto_renew",
      +        "next_renewal_price_cents",
      +        "re_rent_available",
      +        "re_rent_price_cents",
      +        "re_rent_blocked_at",
      +        "created_at",
      +        "paid_until",
      +        "expires_at",
      +        "can_cancel"
      +      ],
      +      "type": "object"
      +    },
      +    "verification": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "id": {
      +          "type": "string"
      +        },
      +        "refunded_cents": {
      +          "maximum": 9007199254740991,
      +          "minimum": -9007199254740991,
      +          "type": "integer"
      +        },
      +        "status": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "status"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "type": "object"
      +}
  4. Changed2 schema fields changedv1.1.8
    • addedInput schema / properties / rental_id / description
      Added value: +"ver_... or ren_... id to cancel"
    • addedInput schema / properties / rental_id / pattern
      Added value: +"^(?:(?:ver|ren)_[A-Za-z0-9_-]{1,64})$"
  5. First observedv1.1.3

TDQS

A4.5/5.0
Behavior3/5

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

Annotations already declare destructive, idempotent, open-world and non-read-only, so the safety profile is largely covered. The description still adds genuinely non-obvious behavior: full refund, a 60-minute cutoff after which the rental runs to its end date, a self-refund fallback for unused verifications, and a throttling consequence for frequent cancellations. It omits some specifics a caller might want (e.g. whether cancelling after the cutoff simply fails, and partial-refund conditions), so it sits above the annotation bar but not at the ceiling.

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?

Front-loaded with the core action and the refund outcome, then two tightly scoped clauses keyed to the id prefix, ending with the returned value. Every sentence carries actionable information; no filler.

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?

A high-consequence mutation tool with an output schema, so return-value detail needn't be spelled out, yet the description still notes the result shows the refunded amount. Nothing essential for correct invocation is missing given annotations and schema already cover safety and parameter format.

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% and the single parameter is already documented, but the description adds meaning the schema cannot: it explains that the id prefix selects two materially different cancellation regimes with different time limits and refund paths. That is real semantic payload beyond the pattern.

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 ("Cancel an SMS order and refund it in full") and then splits the resource into its two concrete forms, ver_... verification and ren_... rental, each with its own rule. An agent can immediately tell this apart from get_rental or re_rent_rental, which are read/renew operations on the same objects.

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?

Gives explicit when-to-use and when-not-to-use guidance per case: for ver_... only before any SMS arrives, and notably "Usually unnecessary" because an unused verification auto-refunds and frequent cancels can pause purchasing; for ren_... only within 60 minutes of purchase. That is a real decision rule plus a discouraging alternative, not just a restatement of the name.

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