Skip to main content
Glama

Cancel the subscription

amber_cancel_subscription
DestructiveIdempotent

Cancel a user's PayPal subscription with confirmation, preserving data and access until the next billing date; use account deletion only if the entire account must be removed.

Instructions

Cancel the user's PayPal subscription. Access continues until next_billing_date (already paid). Data is preserved, not deleted. Do NOT use if the user wants to delete their account entirely -- use amber_delete_account instead.

Cancellation is sent to PayPal immediately; status update arrives via webhook within ~1 minute. Returns code: no_subscription if none exists. Requires confirm: true.

Errors: cancelled (you did not pass confirm: true; NOTHING was attempted - the name is historical and collides with the success status: cancelled this same tool returns when a cancellation DOES happen, so branch on which FIELD carried it: error.code means you did not confirm, status means it is done), no_subscription (this account has no subscription), not_found (PayPal did not recognise the subscription id on this account; it may already have been cancelled or expired), deletion_scheduled (the account is already scheduled for deletion, which ends billing anyway), cancel_failed (PayPal refused; the subscription is unchanged, so it is safe to retry).

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": {
      "confirm": "<confirm>"
    },
    "name": "amber_cancel_subscription"
  }
}

Input Schema

NameRequiredDescriptionDefault
confirmYesWhen `true`: cancels the subscription on PayPal and updates account status. When `false`: returns `code: cancelled` with no side effects, letting you confirm intent first. A STRINGIFIED boolean is also accepted (`"true"`, `"TRUE"`, `" true "`), because some clients JSON-stringify every argument and would otherwise be unable to cancel at all; the published type is `boolean` because that is what a client should send.

Output Schema

NameRequiredDescriptionDefault
statusYesAlways `cancelled`. Access continues to the end of the paid period rather than stopping now, and memories are preserved either way.
messageYesA human-readable summary, including when access actually ends.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changedv1.1.6
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • removedInput schema / additionalProperties
      Removed value: -false
    • changedInput schema / properties / confirm / description
      Previous value: -"When `true`: cancels the subscription on PayPal and updates account status. When `false`: returns `code: cancelled` with no side effects, letting you confirm intent first."New value: +"When `true`: cancels the subscription on PayPal and updates account status. When `false`: returns `code: cancelled` with no side effects, letting you confirm intent first. A STRINGIFIED boolean is also accepted (`\"true\"`, `\"TRUE\"`, `\" true \"`), because some clients JSON-stringify every argument and would otherwise be unable to cancel at all; the published type is `boolean` because that is what a client should send."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "https://json-schema.org/draft/2020-12/schema",
      +  "additionalProperties": false,
      +  "properties": {
      +    "message": {
      +      "description": "A human-readable summary, including when access actually ends.",
      +      "type": "string"
      +    },
      +    "status": {
      +      "const": "cancelled",
      +      "description": "Always `cancelled`. Access continues to the end of the paid period rather than stopping now, and memories are preserved either way.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "status",
      +    "message"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changedv1.1.5
    • changedInput schema / properties / confirm / description
      Previous value: -"Set `true` to cancel, `false` to preview without cancelling."New value: +"When `true`: cancels the subscription on PayPal and updates account status. When `false`: returns `code: cancelled` with no side effects, letting you confirm intent first."
  3. Changed1 schema field changedv1.1.4
    • changedInput schema / properties / confirm / description
      Previous value: -"Set `true` to proceed, `false` to abort without changes."New value: +"Set `true` to cancel, `false` to preview without cancelling."
  4. Changed1 schema field changedv1.1.3
    • changedInput schema / properties / confirm / description
      Previous value: -"Safety gate: must be `true` to proceed. When `false`, the tool returns `code: cancelled` without making any changes — use this to confirm the user's intent before committing."New value: +"Set `true` to proceed, `false` to abort without changes."
  5. Changed1 schema field changedv1.1.2
    • changedInput schema / properties / confirm / description
      Previous value: -"Must be true to confirm subscription cancellation."New value: +"Safety gate: must be `true` to proceed. When `false`, the tool returns `code: cancelled` without making any changes — use this to confirm the user's intent before committing."
  6. First observedv0.1.0

TDQS

A4.8/5.0
Behavior5/5

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

Goes well beyond the annotations: access continues until next_billing_date, data is preserved rather than deleted, the request is dispatched to PayPal immediately with a webhook-driven status update in ~1 minute, and each failure mode is enumerated with its consequence ('NOTHING was attempted', 'the subscription is unchanged, so it is safe to retry'). The explicit error.code-vs-status disambiguation for the colliding 'cancelled' name is a genuine behavioral disclosure that no annotation carries. The 'data is preserved' line is a useful clarification of destructiveHint=true rather than a contradiction.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with purpose and the exclusion, then delivery timing, then errors — a sensible ordering with no filler sentences. The error enumeration is dense and the 'cancelled' collision explanation is a long parenthetical that takes effort to parse, but every clause in it carries operational meaning.

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?

Covers purpose, exclusion, prerequisite, timing, data-retention consequence, and the full set of documented failure modes with recovery advice, which is everything an agent needs for a destructive, open-world mutation. Return-value detail is rightly omitted since an output schema exists.

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's description already explains the true/false split, so the baseline is 3; the description still adds value by restating the confirm: true requirement and, more importantly, by mapping the confirm: false outcome to a specific error field so the agent does not mistake it for a completed cancellation. It does not repeat the stringified-boolean acceptance, but that is already fully documented in 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 ('Cancel the user's PayPal subscription') and immediately bounds the scope by naming the sibling it is not ('Do NOT use if the user wants to delete their account entirely -- use amber_delete_account instead'). An agent can separate this from amber_manage_subscription, amber_reactivate_subscription and amber_delete_account without reading 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 when-to-use, when-not-to-use, and the named alternative for the excluded case. It also states the confirm: true prerequisite and warns that confirm: false is a harmless intent check, which is exactly the routing information an agent needs before calling a cancel tool.

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