Skip to main content
Glama

cancel_subscription

Cancel a subscription. By default it cancels at period end (credits already issued stay; no further renewals). at_period_end: false cancels immediately with no refund. With user_id/email instead of subscription_id, every live subscription of that customer is canceled. Costs 1 CRD (platform credit) per call, charged even when the call is then rejected (a 429 RATE_LIMITED costs nothing). Error results include request_id; quote it to support.

Input Schema

NameRequiredDescriptionDefault
emailNoCustomer email (alternative to subscription_id)
api_keyNoCred API key (optional if set via the x-api-key header)
user_idNoExternal user ID (alternative to subscription_id)
project_idNoCred project ID (optional; the API key already identifies the project)
x402_paymentNoBase64 x402 PaymentPayload, only when a previous call failed with an x402 PaymentRequired because the account is out of CRD
at_period_endNoDefault true; false cancels now
subscription_idNoCred subscription ID or Stripe sub_… ID

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.6/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: credits already issued survive a period-end cancel, immediate cancel has no refund, each call costs 1 CRD even if rejected, a 429 costs nothing, and errors return a request_id to quote to support. These are exactly the side-effect and cost facts an agent needs before a destructive call.

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 tight sentences, front-loaded with the default behavior, then the override, then the alternate targeting mode, then cost/error handling. No filler and no repetition of schema text.

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

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive, credit-charging tool with no annotations and no output schema, the description covers cost, refund policy, and error handling thoroughly. It stops short of describing the success response or stating the identifier requirement explicitly, which keeps it from a 5.

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%, so the baseline is 3, but the description adds real meaning beyond the schema: it states at_period_end defaults to true, and that user_id/email are alternatives to subscription_id that fan out to all live subscriptions. It does not state that at least one identifier is required, which is the remaining gap.

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?

Opens with a specific verb+resource ('Cancel a subscription') and immediately distinguishes itself from list_subscriptions and update_subscription_quantity by describing the cancellation modes. An agent can identify the tool's job without opening the schema.

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

Usage Guidelines4/5

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

Explains the default path (period-end cancel) versus the at_period_end:false path, and clarifies that user_id/email targets every live subscription of a customer rather than one. It does not explicitly name sibling tools to prefer instead, but the parameter-selection guidance is clear enough to route correctly.

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