Skip to main content
Glama

cancel_cart

Destructive

Permanently delete a cart by cart_id. Use when the customer abandons the session or wants to start over. Has no effect on any checkout or paid order already created from this cart. Irreversible, create a new cart to restart.

Input Schema

NameRequiredDescriptionDefault
cart_idYescart_id returned by create_cart.

Output Schema

NameRequiredDescriptionDefault
cart_idYes
cancelledYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / cart_id / description
      Added value: +"cart_id returned by create_cart."
  2. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "additionalProperties": true,
      +  "properties": {
      +    "cancelled": {
      +      "type": "boolean"
      +    },
      +    "cart_id": {
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "cancelled",
      +    "cart_id"
      +  ],
      +  "type": "object"
      +}
  3. First observed

TDQS

A4/5.0
Behavior3/5

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

Annotations already declare destructiveHint=true and readOnlyHint=false, so the mutation/safety profile is covered by structured data. The description does add real value beyond them by scoping the blast radius ("no effect on any checkout or paid order already created from this cart") and stating irreversibility — but it gives no guidance on permissions, failure modes, or whether a cancelled cart remains visible in get_cart.

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?

Three short sentences, front-loaded with the verb and key, then usage, then consequence. Nothing is redundant and every sentence carries distinct 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?

With an output schema present, no return-value explanation is needed, and annotations cover the safety profile. The description is nearly complete for a single-parameter destructive tool, lacking only error/idempotency behavior for repeat calls.

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

Parameters3/5

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

Only one parameter with 100% schema description coverage, which already explains cart_id comes from create_cart. The description restates the keying by cart_id but adds no format, validation, or edge-case semantics (e.g. what happens with an already-deleted or already-converted cart).

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 ("Permanently delete a cart by cart_id") and pre-empts the misleadingly soft name "cancel" by clarifying the operation is a hard delete. An agent can distinguish it from update_cart and create_cart without opening a 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?

Gives concrete triggers ("customer abandons the session or wants to start over") and points at create_cart as the restart path. It stops short of an explicit "do not use this to modify a cart — use update_cart instead" exclusion, so the negative case is only implied.

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.