Skip to main content
Glama

Cancel a subscription

shop.subscription.cancel
DestructiveIdempotent

Cancel a subscription you pay for. The period already paid runs to current_period_end (access_until); no further renewal quotes are issued. Idempotent. Another identity's subscription is 404.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNo
subscription_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuYes
statusYes
period_noYes
pull_modeYes
canceled_atNo
max_periodsYes
renewal_keyNo
access_untilNo
status_reasonYes
next_charge_atYes
subscription_idYes
current_period_endYes
preauthorized_periodsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / renewal_key
      Added value: +{
      +  "type": "string"
      +}
  2. Changed3 schema fields changed
    • addedOutput schema / properties / preauthorized_periods
      Added value: +{
      +  "items": {
      +    "additionalProperties": {},
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / pull_mode
      Added value: +{
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "subscription_id",
      -  "sku",
      -  "status",
      -  "status_reason",
      -  "period_no",
      -  "current_period_end",
      -  "next_charge_at",
      -  "max_periods"
      -]New value: +[
      +  "subscription_id",
      +  "sku",
      +  "status",
      +  "status_reason",
      +  "period_no",
      +  "current_period_end",
      +  "next_charge_at",
      +  "max_periods",
      +  "pull_mode"
      +]
  3. Added

TDQS

A3.6/5.0
Behavior4/5

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

Adds substantive behavior beyond the annotations: paid period runs to current_period_end/access_until, no further renewal quotes, and another identity's subscription returns 404. The 'Idempotent' sentence merely restates idempotentHint=true, and the destructive/readOnly profile is left to the annotations. Still, the effect and ownership-error semantics are genuinely useful additions.

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 core action, then effect, then idempotency, then error behavior. No filler; every clause carries information.

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 mutation with annotations and an output schema present, it covers effect timing, idempotency, and error semantics well, so return values need not be explained. The one real gap is the unexplained 'reason' parameter, which keeps this from being fully complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0% and the description does nothing to compensate: it never explains the required subscription_id or the optional 'reason' field (what it is used for, length, whether it is surfaced to merchants). With two undocumented parameters, the description leaves the schema to carry weight it cannot.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/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 scopes it with 'you pay for', which distinguishes it from order-level and merchant-side siblings like shop.order.cancel. It stops short of naming an alternative directly, but the resource and payer scope make the intent unambiguous.

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

Usage Guidelines3/5

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

The phrase 'a subscription you pay for' implies the usage context (subscriber-side vs merchant-side), but there is no explicit when-to-use, when-not, or named alternative among the shop.* siblings. An agent must infer the boundary rather than being told it.

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.