Skip to main content
Glama

Cancel SMS verification or rental

cancel_rental
DestructiveIdempotent

Cancels an SMS verification or long-term rental and issues a full refund. Verifications can be canceled before SMS arrives; rentals within 60 minutes of purchase.

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.

Input Schema

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rentalNo
verificationNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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"
      +}
  2. 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})$"
  3. First observedv1.1.3

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and openWorldHint=true, so the safety profile is partly covered. The description still adds real operational context the annotations cannot: the refund is full, the 60-minute rental cutoff, the automatic refund on window close, and the side effect that frequent cancellations temporarily pause SMS purchasing. It does not restate the safety hints, but the result-format note ('shows the amount refunded') is thin.

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-loads the core action and refund in the first sentence, then branches by ID type. Every sentence earns its place — the warnings about unnecessary cancellations and the pause side effect are decision-relevant, not 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?

An output schema exists, so return values need not be documented, and the description still notes the refund amount is returned. For a single-parameter, destructive-but-idempotent cancellation tool, the timing constraints, refund semantics, and sibling routing are all present.

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 regex already constrains the single rental_id to ver_/ren_ prefixes, so the baseline is 3. The description goes further by explaining what each prefix operationally implies (different cancellation windows and rules), which is meaning the schema's pattern alone does not convey.

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 (cancel) plus resource (SMS order) and adds the refund outcome. It clearly separates the two ID families (ver_... verification vs ren_... rental) with distinct rules, letting an agent distinguish this from siblings like get_rental or reuse_number without opening any 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?

Gives explicit conditions for each case: verification cancellable only before any SMS arrives, rental only within 60 minutes of purchase. It also states when NOT to use it (usually unnecessary because no-SMS verifications auto-refund at window close, and frequent cancellations pause purchasing) — a genuine exclusion with a rationale.

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