Skip to main content
Glama

Storewire Lite demo store

Remove a product from a cart

cart_remove_item
DestructiveIdempotent

Removes a product from an anonymous Trailhead Supply cart and returns the whole cart. Removing a product the cart does not hold leaves the cart as it is.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "cart_token": "<cart_token>",
      "product": "<product>"
    },
    "name": "cart_remove_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
localeNoAnswer language: en (default en). Names, labels and URLs follow it.
productYesThe product: its public_id from an earlier answer, its page URL or slug on the store's website, or the manufacturer model number.
cart_tokenYesThe cart_token an earlier cart answer returned.

Output Schema

NameRequiredDescriptionDefault
linesYes
totalNoWhat the cart costs before delivery, discounts taken off; the store's website shows the same.
limitsYes
cart_urlYesOpens the store's website with these products in the shopper's own cart, where they review and order; nothing is ordered before that.
currencyYes
subtotalYesBefore delivery and the bundle saving.
truncatedNoPresent and true only when the answer outgrew the size budget and its last list items were left out; ask narrower to see them.
cart_tokenYesPass it to the other cart tools. A secret: whoever holds it can change this cart.
expires_atYesISO 8601; every change pushes it back.
item_countYesUnits over all lines.
answer_typeNoWhat this answer is, for rendering.
vat_includedYes
delivery_hintYesHow delivery is charged, in the answer language.
discount_totalNoThe bundle saving; 0 without a whole bundle.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructive, idempotent and non-read-only; the description adds real context beyond them by stating that the entire cart is returned and that a missing product is a no-op rather than an error. It does not discuss cart token lifetime or consequences for other cart contents, but the core behavioral profile is disclosed.

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?

Two short sentences, the action stated first and the idempotent no-op rule second; no filler or restated title text.

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, the description need not explain return values (it still notes the whole cart is returned), and it covers the main surprising case of removing a non-held product. What remains unsaid is failure behavior for invalid or expired cart tokens.

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 each parameter is documented in the schema; the description only hints at the cart scope via 'anonymous ... cart' and adds no format or accepted-value detail beyond the schema, so the baseline 3 applies.

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 (removes) and resource (a product from an anonymous Trailhead Supply cart) and adds the return shape (the whole cart), which cleanly separates it from cart_add_item and cart_update_item.

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?

Usage is implied by the name and the removal verb; the description adds an edge-case rule (removing an absent product leaves the cart unchanged) but never says when to prefer this over cart_update_item or how it relates to cart_view.

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.