Skip to main content
Glama

Remove cart line

cart_remove
DestructiveIdempotent

Remove a cart line by its index (from view_cart). Args: index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYesZero-based cart line index from view_cart.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent instead of a cart when the call failed (bad index, unavailable size, ...).
itemsNoCart lines in index order — this index is what set_cart_quantity/cart_update/cart_remove take.
currencyNo
subtotalNoSum of price x qty over all lines, USD.
checkout_urlNoCart page URL for the human.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / index / description
      Added value: +"Zero-based cart line index from view_cart."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "checkout_url": {
      +      "description": "Cart page URL for the human.",
      +      "type": "string"
      +    },
      +    "currency": {
      +      "type": "string"
      +    },
      +    "error": {
      +      "description": "Present instead of a cart when the call failed (bad index, unavailable size, ...).",
      +      "type": "string"
      +    },
      +    "items": {
      +      "description": "Cart lines in index order — this index is what set_cart_quantity/cart_update/cart_remove take.",
      +      "items": {
      +        "properties": {
      +          "code": {
      +            "type": "string"
      +          },
      +          "currency": {
      +            "type": "string"
      +          },
      +          "custom": {
      +            "description": "True when the line is a user-generated custom print.",
      +            "type": "boolean"
      +          },
      +          "fabric": {
      +            "type": "string"
      +          },
      +          "good_id": {
      +            "type": "integer"
      +          },
      +          "price": {
      +            "type": "number"
      +          },
      +          "product": {
      +            "type": "string"
      +          },
      +          "qty": {
      +            "type": "integer"
      +          },
      +          "size": {
      +            "type": "string"
      +          },
      +          "title": {
      +            "type": "string"
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "subtotal": {
      +      "description": "Sum of price x qty over all lines, USD.",
      +      "type": "number"
      +    }
      +  },
      +  "type": "object"
      +}
  2. First observed

TDQS

A3.5/5.0
Behavior2/5

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

Annotations already indicate destructiveHint and readOnlyHint. The description adds no new behavioral traits beyond what is in annotations and schema, such as idempotency behavior or error handling. It does not contradict annotations.

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?

The description is concise but includes the redundant 'Args: index.' which duplicates the schema. The first sentence is efficient and front-loaded.

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 simple removal tool with output schema and annotations, the description is adequate. It explains the action and the parameter, but lacks details on edge cases or side effects.

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 description merely repeats the schema's parameter description. It adds no additional semantics beyond 'from view_cart', which is already in the schema.

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?

The verb 'Remove' clearly states the action, 'cart line' specifies the resource, and the mention of index distinguishes from other cart manipulation tools like cart_update or set_cart_quantity. The reference to view_cart adds context.

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 description does not explicitly state when to use this tool vs. alternatives like cart_update or remove_promo. It implies usage for removing a specific line by index but provides no when-not-to-use guidance or alternative recommendations.

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