Skip to main content
Glama

X402-Broker Universal MCP Gateway & Multi-Agent Swarm Router

cancel_cart

Idempotent

Cancel an active shopping cart session by cart_id. Example: cancel_cart(cart_id='cart_1')

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "cancel_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
cart_idNoShopping cart identifier to cancel.

Output Schema

NameRequiredDescriptionDefault
storeYesMerchant domain identifier.
ucp_versionNoSupported UCP specification version.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare idempotentHint=true, destructiveHint=false and readOnlyHint=false, so the safety profile is structured data. The description adds the 'active cart session' precondition, which is genuine behavioral context, but says nothing about what happens to cart contents or lines on cancellation.

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?

Two short sentences, with the action and target front-loaded before the example. The example earns marginal keep, but it is close to filler against an already self-explanatory schema.

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?

An output schema exists, so return values need not be described, and the single required parameter is fully covered. For a simple state-changing cancel, the main remaining gap is what happens to the cart's contents and whether cancellation is reversible — partially covered by destructiveHint=false.

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 100% and the single parameter is documented as 'Shopping cart identifier to cancel.' The inline example cancel_cart(cart_id='cart_1') adds a small format hint but nothing the schema does not already provide, so baseline 3 applies.

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 ('Cancel') and resource ('an active shopping cart session'), identified by cart_id, so the agent knows exactly what operation is performed. It does not explicitly distinguish itself from the sibling cancel_checkout, which is the one plausible confusion point.

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 word 'active' implies a precondition (only live carts can be cancelled), which is useful implied usage guidance. However, it never states when to use this versus cancel_checkout, complete_checkout, or update_cart, so the agent must infer the boundary itself.

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.