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_idYes

Output Schema

NameRequiredDescriptionDefault
cart_idYes
cancelledYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / cart_id / description
      Removed value: -"cart_id returned by create_cart."
  2. Changed1 schema field changed
    • addedInput schema / properties / cart_id / description
      Added value: +"cart_id returned by create_cart."
  3. 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"
      +}
  4. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already declare destructiveHint=true, and the description builds on that by specifying what is NOT destroyed (existing checkouts and paid orders), that the action is irreversible, and the recovery path (create a new cart). That is exactly the extra context annotations cannot carry.

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 short sentences, front-loaded with the action, then trigger, then side-effect boundary, then irreversibility. Nothing is redundant with the annotations or schema.

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?

For a single-param mutation with an output schema present, the description covers what is destroyed, what is spared, irreversibility, and the restart path. No further information is needed to invoke it correctly.

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?

Schema coverage is 0% for the single param, and the description only names cart_id without adding format, source, or validity guidance (e.g. whether it accepts an abandoned or already-cancelled cart id). Minimum viable given one obvious identifier.

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') plus the key scope constraint that it does not touch checkouts or paid orders, which separates it from cancel_checkout and update_cart. An agent can choose between this and its siblings 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 an explicit trigger condition: customer abandons the session or wants to start over. It does not name the alternative tool for the non-destructive case (update_cart for edits, or indeed create_cart for restart), so the routing is clear but not fully enumerated.

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