Skip to main content
Glama

SendaMeal Storefront

update_cart_item

Change an item that is already in the shopping cart.

Use this tool to change the quantity, the variant, or the modifier options of one cart item. A cart must exist and must have items.

Steps

  1. Call the 'add_item_to_cart' tool to put an item in the cart.

  2. Call this tool to change the item.

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

Rules

Send 'line_item_id' to select the cart item to change. Send 'quantity' and 'productEntityId' in 'item'. If the product has variants, send 'variantEntityId'.

Modifier options

'item.selectedOptions' works as it works in the 'add_item_to_cart' tool. The 'get_product_details' tool returns these options in 'modifierOptions'.

If the product has required modifier options, send them again in this request. If you do not send them, the server does not change the item. Send only the buckets that you need.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemYes
line_item_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cartYes
messageNo
successYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • removedInput schema / properties / item / properties / selectedOptions / required
      Removed value: -[
      -  "checkboxes",
      -  "dateFields",
      -  "multiLineTextFields",
      -  "multipleChoices",
      -  "numberFields",
      -  "textFields"
      -]
    • changedInput schema / properties / item / required
      Previous value: -[
      -  "quantity",
      -  "productEntityId",
      -  "variantEntityId",
      -  "selectedOptions"
      -]New value: +[
      +  "quantity",
      +  "productEntityId",
      +  "variantEntityId"
      +]
  2. First observed

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It does well by noting that required modifier options must be resent or the item is not changed, and that only specified buckets are updated (implying partial update semantics). It also directs agents to other tools for selectedOptions structure. It lacks explicit mention of error handling or what happens to unspecified fields, but given the presence of an output schema, this is a solid attempt at transparency.

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 well-structured with clear sections for steps, rules, and modifier options. The first sentence immediately establishes the purpose, followed by prerequisites and ordered steps. While it is longer than some, every section earns its place by covering essential usage details. The use of headings and numbered steps aids readability, and there is no redundant filler.

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?

Given the tool's complexity (nested object, six modifier option types, conditional fields), the description covers the critical aspects: how to select the item, what to send, and the nuance of required modifier options. It leverages references to sibling tools for shared structures, which is an efficient trade-off. With an output schema available, the description doesn't need to detail return values. Minor gaps (e.g., error behavior, handling of missing line_item_id) exist but are not detrimental.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description is the sole source of parameter meaning. It explains line_item_id selects the cart item, item contains quantity, productEntityId, and variantEntityId, and that selectedOptions works as in add_item_to_cart. It clarifies conditional fields (variantEntityId) and required vs. optional modifier options, going well beyond the raw schema. Some individual fields (e.g., productEntityId) are not explicitly described, but their purpose is self-evident from the tool name and context.

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 description clearly states the tool 'Change an item that is already in the shopping cart' and specifies the exact attributes it can change (quantity, variant, modifier options). It distinguishes itself from sibling tools by describing its role in the cart workflow and referencing add_item_to_cart and create_checkout_url as adjacent steps. This gives an agent a precise understanding of what the tool does and when it fits.

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

Usage Guidelines5/5

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

The description provides explicit prerequisites ('A cart must exist and must have items'), a step-by-step sequence (call add_item_to_cart first, then this tool, then create_checkout_url), and references to get_product_details for obtaining modifier options. It also clarifies when to send certain parameters (e.g., variantEntityId if product has variants). This is a model of usage guidance, leaving no ambiguity about when and how to invoke the tool.

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