Skip to main content
Glama

remove_item_from_cart

Remove an item from the shopping cart.

This tool removes the item completely. To lower the quantity, use the 'update_cart_item' tool.

Steps

  1. Call the 'add_item_to_cart' tool to put items in the cart.

  2. Call this tool to remove an item.

  3. Call the 'create_checkout_url' tool to get a checkout URL.

Rules

A cart with items must exist. Send 'item_id' to select the cart item to remove. It is the 'entityId' of that item in the cart that the last cart tool call returned, for example 'add_item_to_cart'. It is not 'productEntityId' or 'variantEntityId'.

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": {
      "item_id": "<item_id>"
    },
    "name": "remove_item_from_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
item_idYesThe 'entityId' of the cart item to remove. Take it from 'cart.lineItems.physicalItems' or 'cart.lineItems.digitalItems' in the latest cart response. It is not 'productEntityId' or 'variantEntityId'.

Output Schema

NameRequiredDescriptionDefault
cartYes
messageNo
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations, the description carries the full burden and does disclose the key behavioral trait: the item is removed completely, not decremented. It also states the cart-state prerequisite. It stops short of covering permanence/reversibility or failure behavior for an invalid item_id, which would matter for a mutation tool.

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?

Front-loaded with the core action and the sibling distinction; Rules section is tight. The Steps list is somewhat ceremonial for a single-parameter tool and the schema-duplicating ID sentence adds length without new meaning.

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 one-parameter mutation whose return values are covered by an existing output schema, the description supplies prerequisites, the destructive scope, and sibling routing. Error handling for a missing item_id target is the main omission.

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 description coverage is 100%, so the schema already documents 'item_id' fully, including the entityId source path and the 'not productEntityId or variantEntityId' warning. The description repeats rather than extends that, which is the baseline-3 case.

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 ('Remove an item from the shopping cart') and immediately distinguishes the operation from the closest sibling by noting removal is complete versus 'update_cart_item' which lowers quantity. An agent can select it without opening the 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?

Explicitly names the alternative ('update_cart_item') and the condition that selects it, plus a state prerequisite ('A cart with items must exist'). The numbered Steps section adds workflow ordering, though step 1 (add item first) is not strictly a precondition and slightly muddies the guidance.

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