Skip to main content
Glama

remove_cart_item

Remove one line from one of your carts, addressed by variant_id.

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_id": "<cart_id>",
      "variant_id": "<variant_id>"
    },
    "name": "remove_cart_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
cart_idYesThe cart handle, from `create_cart`.
variant_idYesThe line's variant id.

Output Schema

NameRequiredDescriptionDefault
linesYesThe cart's lines, in cart order.
cart_idYesThe cart handle.
total_yenYesGrand total in yen: subtotal plus shipping.
item_countYesTotal units across all lines.
shipping_yenYesShipping fee in yen (free at the store's threshold).
subtotal_yenYesSum of purchasable line totals, in yen.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

B3.1/5.0
Behavior2/5

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

No annotations exist, so the description carries the full burden. It implies a destructive mutation and usefully clarifies that the whole line goes rather than a single unit, but says nothing about reversibility, required permissions/ownership of the cart, or behavior when the line is absent.

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?

One sentence, front-loaded with the action and scope, with no filler. Every clause carries information the agent needs.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/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 explained, and both parameters are fully documented. For a two-parameter destructive mutation with zero annotations, however, the missing notes on error conditions and irreversibility leave a real gap.

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%, with cart_id documented as a cart handle from create_cart and variant_id as the line's variant id. The description's "one of your carts, addressed by variant_id" adds only slight framing 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.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

"Remove one line from one of your carts" gives a specific verb (remove) and resource (a cart line), and "addressed by variant_id" identifies the key used. It is distinguishable from add_cart_item/update_cart_item by verb alone, though it never names those siblings explicitly.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

There is no statement of when to choose this over update_cart_item (e.g. setting quantity to zero) or what to do when the variant is not in the cart. Usage is only implied by the verb; no prerequisites or exclusions are given.

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