Skip to main content
Glama

cancelSubscription

Destructive

Cancel a subscription immediately. Canceling is permanent and cannot be undone. To end a subscription on a future date instead, set its endDate with updateSubscription. Returns the subscription as it was just before the cancellation, so its status is not yet canceled. Get subscriptionId from getSubscriptions. Never invent UUIDs; only use values from prior tool responses.

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": {
      "subscriptionId": "<subscriptionId>"
    },
    "name": "cancelSubscription"
  }
}

Input Schema

NameRequiredDescriptionDefault
subscriptionIdYesThe id of the subscription.

Output Schema

NameRequiredDescriptionDefault
subscriptionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / subscription / properties / cancelRequest
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "The latest request to cancel the subscription made by the person it belongs to.",
      +  "properties": {
      +    "comment": {
      +      "description": "What the person told the administrators about why they want to cancel.",
      +      "type": "string"
      +    },
      +    "createDate": {
      +      "description": "ISO timestamp of when the person asked to cancel the subscription.",
      +      "format": "date-time",
      +      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
      +      "type": "string"
      +    },
      +    "decisionDate": {
      +      "description": "ISO timestamp of when the request was approved, declined or withdrawn.",
      +      "format": "date-time",
      +      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
      +      "type": "string"
      +    },
      +    "endDate": {
      +      "description": "ISO timestamp of the day the person wants the subscription to end.",
      +      "format": "date-time",
      +      "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
      +      "type": "string"
      +    },
      +    "reason": {
      +      "description": "What the administrator told the person about why the request was declined.",
      +      "type": "string"
      +    },
      +    "status": {
      +      "description": "State of the request. A `requested` one waits for an administrator. It becomes `approved` when an administrator sets the subscription's end date, `declined` when an administrator declines it, and `withdrawn` when the person takes it back.",
      +      "enum": [
      +        "requested",
      +        "approved",
      +        "declined",
      +        "withdrawn"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "createDate",
      +    "endDate",
      +    "status"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / subscription / properties / items / items / properties / doorflowGroupRef
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "DoorFlow access group reference."
      +}
  3. Changed1 schema field changed
    • removedOutput schema / properties / subscription / properties / request / properties / ticketRef
      Removed value: -{
      -  "description": "ID of the ticket that holds the request's conversation.",
      -  "format": "uuid",
      -  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      -  "type": "string"
      -}
  4. Changed4 schema fields changed
    • addedOutput schema / properties / subscription / properties / advanceInvoicing / properties / dayOfMonth
      Added value: +{
      +  "description": "Day of the month, from 1 to 28, to issue an invoice before renewal. Present when invoices are issued on a fixed day.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / subscription / properties / advanceInvoicing / properties / days / description
      Previous value: -"Number of days before renewal to issue an invoice."New value: +"Number of days before renewal to issue an invoice. Present when invoices are issued a number of days before renewal."
    • changedOutput schema / properties / subscription / properties / advanceInvoicing / properties / type / enum
      Previous value: -[
      -  "days",
      -  "default"
      -]New value: +[
      +  "dayOfMonth",
      +  "days",
      +  "default"
      +]
    • changedOutput schema / properties / subscription / properties / advanceInvoicing / required
      Previous value: -[
      -  "days",
      -  "type"
      -]New value: +[
      +  "type"
      +]
  5. Changed1 schema field changed
    • addedOutput schema / properties / subscription / properties / request / properties / ticketRef
      Added value: +{
      +  "description": "ID of the ticket that holds the request's conversation.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
  6. Changed5 schema fields changed
    • addedOutput schema / properties / subscription / properties / paymentMethod
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Payment method this subscription's invoices are charged to. When missing, the customer's default payment method is charged.",
      +  "properties": {
      +    "id": {
      +      "description": "Payment method ID.",
      +      "format": "uuid",
      +      "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +      "type": "string"
      +    },
      +    "pgType": {
      +      "description": "Payment gateway of the payment method.",
      +      "enum": [
      +        "hyperpay",
      +        "mollie",
      +        "paypal",
      +        "paytabs",
      +        "plata",
      +        "stripe",
      +        "tap",
      +        "wayforpay"
      +      ],
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "id",
      +    "pgType"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / subscription / properties / request / properties / subscriptionRef
      Added value: +{
      +  "description": "ID of the subscription an approval created from the request.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • addedOutput schema / properties / subscription / properties / requestRef
      Added value: +{
      +  "description": "ID of the request this subscription was approved from.",
      +  "format": "uuid",
      +  "pattern": "^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$",
      +  "type": "string"
      +}
    • changedOutput schema / properties / subscription / properties / status / description
      Previous value: -"Subscription status. A `requested` subscription is one a person asked for that an administrator has not approved yet: it bills nothing, grants nothing and holds no resource. It becomes `declined` when an administrator declines it or nobody answers it in time, and `withdrawn` when the person takes it back."New value: +"Subscription status. A `requested` subscription is one a person asked for that an administrator has not approved yet: it bills nothing, grants nothing and holds no resource. It becomes `declined` when an administrator declines it or nobody answers it in time, `withdrawn` when the person takes it back, and `approved` when an administrator approves it, which creates a separate subscription."
    • changedOutput schema / properties / subscription / properties / status / enum
      Previous value: -[
      -  "active",
      -  "scheduled",
      -  "incomplete",
      -  "incompleteExpired",
      -  "canceled",
      -  "requested",
      -  "declined",
      -  "withdrawn"
      -]New value: +[
      +  "active",
      +  "scheduled",
      +  "incomplete",
      +  "incompleteExpired",
      +  "canceled",
      +  "requested",
      +  "declined",
      +  "withdrawn",
      +  "approved"
      +]
  7. Changed6 schema fields changed
    • changedOutput schema / properties / subscription / properties / request / description
      Previous value: -"Set on a subscription a person asked for and an administrator has yet to approve."New value: +"Set on a subscription a person asked for, whether it still waits for an administrator or was answered."
    • addedOutput schema / properties / subscription / properties / request / properties / decisionDate
      Added value: +{
      +  "description": "ISO timestamp of when the request was declined, withdrawn or expired.",
      +  "format": "date-time",
      +  "pattern": "^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d(?::[0-5]\\d(?:\\.\\d+)?)?(?:Z))$",
      +  "type": "string"
      +}
    • addedOutput schema / properties / subscription / properties / request / properties / expired
      Added value: +{
      +  "description": "Whether the request was declined because nobody answered it in time.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / subscription / properties / request / properties / reason
      Added value: +{
      +  "description": "What the administrator told the person about why the request was declined.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / subscription / properties / status / description
      Previous value: -"Subscription status. A `requested` subscription is one a person asked for that an administrator has not approved yet: it bills nothing, grants nothing and holds no resource."New value: +"Subscription status. A `requested` subscription is one a person asked for that an administrator has not approved yet: it bills nothing, grants nothing and holds no resource. It becomes `declined` when an administrator declines it or nobody answers it in time, and `withdrawn` when the person takes it back."
    • changedOutput schema / properties / subscription / properties / status / enum
      Previous value: -[
      -  "active",
      -  "scheduled",
      -  "incomplete",
      -  "incompleteExpired",
      -  "canceled",
      -  "requested"
      -]New value: +[
      +  "active",
      +  "scheduled",
      +  "incomplete",
      +  "incompleteExpired",
      +  "canceled",
      +  "requested",
      +  "declined",
      +  "withdrawn"
      +]
  8. Changed3 schema fields changed
    • addedOutput schema / properties / subscription / properties / request
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Set on a subscription a person asked for and an administrator has yet to approve.",
      +  "properties": {
      +    "comment": {
      +      "description": "What the person told the administrators when asking for the subscription.",
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • changedOutput schema / properties / subscription / properties / status / description
      Previous value: -"Subscription status."New value: +"Subscription status. A `requested` subscription is one a person asked for that an administrator has not approved yet: it bills nothing, grants nothing and holds no resource."
    • changedOutput schema / properties / subscription / properties / status / enum
      Previous value: -[
      -  "active",
      -  "scheduled",
      -  "incomplete",
      -  "incompleteExpired",
      -  "canceled"
      -]New value: +[
      +  "active",
      +  "scheduled",
      +  "incomplete",
      +  "incompleteExpired",
      +  "canceled",
      +  "requested"
      +]
  9. First observed

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 and readOnlyHint=false, but the description adds the consequence that the agent cannot infer: the action is permanent and irreversible. It also flags a non-obvious return nuance — the response reflects the pre-cancellation state, so status will not read 'canceled' — which prevents a false-negative verification loop. It stops short of describing auth or failure modes, but the key behavioral risks are covered.

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, front-loaded with the action and its irreversibility, followed by the alternative, the return caveat, and the id-provenance rule. No filler or repetition.

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?

For a single-parameter destructive mutation with an output schema and full annotation coverage, this is complete: the agent knows how to obtain the id, what cannot be undone, when to pick the sibling instead, and how to interpret the returned object.

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% for the single subscriptionId parameter, so the baseline is met by the schema alone. The description still adds real value by specifying provenance (obtain it from getSubscriptions) and forbidding invented UUIDs, which the schema's format/pattern constraints cannot express.

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 a subscription immediately') and immediately contrasts it with the deferred alternative (set endDate via updateSubscription), so the agent can separate this from updateSubscription without opening either 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 an explicit when-not rule ('to end a subscription on a future date instead, set its endDate with updateSubscription') and names the prerequisite source for the id ('getSubscriptions'), plus a hard constraint against fabricating UUIDs.

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