Skip to main content
Glama

Cancel subscription

cancel_subscription
Destructive

Cancel a subscription. Sets status='canceled', canceled_at, cancellation_category, cancellation_reason. Writes a subscription_events row of type 'canceled' with a negative mrr_delta. Trigger drops account.current_arr_cents. Returns a suggestion to set account.lifecycle_stage='churned' if this was the last active subscription. DESTRUCTIVE: confirm with the user first, then call again with confirm: true.

When to use: Customer cancellation. Always capture the cancellation_category for retention analysis.

Example: Acme cancelled — they consolidated to a competitor. Cancel the subscription effective today.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesA uuid.
confirmNoBoolean (true/false).
canceled_atYesMust match /^\d{4}-\d{2}-\d{2}$/.
opportunity_idNoA uuid.
cancellation_reasonNoFree-text reason in the customer's words, stored on the subscription and as the 'canceled' event's note; cancellation_category is the coded bucket.
cancellation_categoryYesDefaults: price | product_fit | competitor | no_decision | business_change | support | consolidation | other. A workspace admin may rename or add values — see the live set in propose_updates' workspace.enum_values, or an admin's describe_schema.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
noteNo
accountNo
canceledNo
guidanceNo
subscriptionNo
requires_confirmNo

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?

Beyond the destructiveHint annotation, the description discloses exactly what is mutated (status, canceled_at, category, reason), the side effects (subscription_events row with negative mrr_delta, account.current_arr_cents drop), the returned churn suggestion, and the mandatory two-step confirm:true protocol. This is unusually rich behavioral context.

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 the effects before the when-to-use and example, and every sentence carries weight. The closing Acme example is illustrative but slightly verbose, keeping it just under a 5.

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?

With an output schema present, return values need not be explained, and the description nonetheless covers effects, prerequisites, the churn suggestion, and the confirm flow. Nothing needed to invoke it correctly is missing.

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 baseline is 3, but the description adds real meaning: it explains the confirm parameter's two-call pattern and reinforces why cancellation_category matters. It doesn't expand on opportunity_id or the category enum set beyond what the schema documents.

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') and immediately details the concrete effects (status set, event row written, ARR dropped). It is clearly distinguishable from the sibling renew_subscription and doesn't restate the title.

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?

'When to use: Customer cancellation' gives a clear selection context, and the destructive confirm workflow plus the retention-analysis note add practical guidance. It does not explicitly name an alternative tool or state when NOT to cancel, so it stops short of a 5.

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