Skip to main content
Glama

Update cart line

cart_update_item
Destructive

Update quantity, notes, or selected options on an existing cart line item. Quantity <= 0 removes the item.

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": {
      "storeId": "<storeId>",
      "lineItemId": "<lineItemId>",
      "quantity": "<quantity>"
    },
    "name": "cart_update_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoOptional replacement notes.
storeIdYesOkam store id.
quantityYesNew quantity. Use 0 to remove.
lineItemIdYesLine item id from cart_get.
selectedOptionIdsNoOptional replacement selected product option ids as GUID strings.

Output Schema

NameRequiredDescriptionDefault
cartNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / cart / properties / items / items / properties / product / properties / allergens / items / properties / code
      Added value: +{
      +  "type": [
      +    "string",
      +    "null"
      +  ]
      +}
  2. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already flag destructiveHint=true and readOnlyHint=false, so the mutation risk is disclosed structurally. The description adds real value by revealing that quantity <= 0 deletes the line and that notes/options are replaced rather than appended, but it omits what happens to unspecified fields and any failure/auth conditions.

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?

Two tight sentences with the mutation scope front-loaded and the removal edge case second. No wasted wording, though a routing hint for removal would have used the remaining space well.

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 annotations covering the safety profile and an output schema covering returns, the description only needs to explain mutation semantics, which it largely does. Gaps around replacement semantics for notes/options and error conditions are minor for a single-line update tool.

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%, so the baseline is 3. The description confirms which parameters are optional-ish by listing quantity, notes, and selected options, and extends the schema's "0 to remove" to non-positive quantities, but adds no detail on option-id formats or lineItemId sourcing.

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?

States a specific verb and resource ("Update ... on an existing cart line item") and enumerates the mutable fields (quantity, notes, selected options). It is distinguishable from cart_add_item, though it does not explicitly contrast with the sibling cart_remove_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?

The description implies usage by naming the fields it mutates and by noting that quantity <= 0 removes the item, but it never states when to prefer cart_remove_item or cart_add_item instead, nor any prerequisites such as cart or line-item state.

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