Skip to main content
Glama

Commonlands Optics: M12 Lens and C-Mount Lens Finder + Field-of-View Calculator

Update Shopify cart

update_cart
Destructive

Replace the complete Shopify cart after buyer confirmation. Requires id and cart_access_token. Read the cart first, then send cart.line_items containing every item to retain with item.id (ProductVariant GID), quantity, and optional existing line id. Omitted lines are removed; [] empties the cart. This does not place an order.

Input Schema

NameRequiredDescriptionDefault
idYes
cartYes
metaNo
cart_access_tokenYesOwner credential returned by create_cart for this cart id.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed8 schema fields changed
    • removedInput schema / properties / cart / properties / line_items / description
      Removed value: -"Variant items to add to the cart."
    • addedInput schema / properties / cart / properties / line_items / items / properties / id
      Added value: +{
      +  "type": "string"
      +}
    • changedInput schema / properties / cart / properties / line_items / items / required
      Previous value: -[
      -  "quantity",
      -  "item"
      -]New value: +[
      +  "item",
      +  "quantity"
      +]
    • changedInput schema / properties / cart / properties / line_items / minItems
      Previous value: -1New value: +0
    • removedInput schema / properties / cart / properties / remove_line_ids
      Removed value: -{
      -  "description": "Existing Shopify CartLine gids to remove explicitly.",
      -  "items": {
      -    "type": "string"
      -  },
      -  "maxItems": 25,
      -  "minItems": 1,
      -  "type": "array"
      -}
    • removedInput schema / properties / cart / properties / signals
      Removed value: -{
      -  "type": "object"
      -}
    • removedInput schema / properties / cart / properties / update_items
      Removed value: -{
      -  "description": "Existing Shopify cart line IDs with desired quantities; quantity 0 removes the line.",
      -  "items": {
      -    "additionalProperties": false,
      -    "properties": {
      -      "id": {
      -        "description": "Shopify CartLine gid.",
      -        "type": "string"
      -      },
      -      "quantity": {
      -        "maximum": 999,
      -        "minimum": 0,
      -        "type": "integer"
      -      }
      -    },
      -    "required": [
      -      "id",
      -      "quantity"
      -    ],
      -    "type": "object"
      -  },
      -  "maxItems": 25,
      -  "minItems": 1,
      -  "type": "array"
      -}
    • addedInput schema / properties / cart / required
      Added value: +[
      +  "line_items"
      +]
  2. Changed2 schema fields changed
    • addedInput schema / properties / cart_access_token
      Added value: +{
      +  "description": "Owner credential returned by create_cart for this cart id.",
      +  "type": "string"
      +}
    • changedInput schema / required
      Previous value: -[
      -  "id",
      -  "cart"
      -]New value: +[
      +  "id",
      +  "cart",
      +  "cart_access_token"
      +]
  3. First observed

TDQS

A4.6/5.0
Behavior5/5

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

Beyond the destructiveHint=true annotation, the description explains the actual destruction semantics: omitted lines are removed and [] empties the cart entirely. It also states the auth requirement (id + cart_access_token) and explicitly denies side effects ("does not place an order").

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?

Four tight sentences with the replace-and-destroy semantics front-loaded, followed by the operational recipe and a crucial negative constraint. No sentence is 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?

For a destructive nested-object mutation with no output schema, the description covers semantics, ordering, and the return-side caveat (no order placed). It stops short of describing what the response contains or how conflicts/errors are surfaced.

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?

With only 25% schema coverage, the description does real work: it explains that cart.line_items must contain every retained item, that item.id is a ProductVariant GID (the schema only says string), and that line id is optional. It omits any mention of the meta or cart.context parameters, which remain undocumented.

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?

"Replace the complete Shopify cart after buyer confirmation" names a specific verb (replace) and resource (cart) and disambiguates from create_cart/get_cart/cancel_cart by emphasizing full replacement. The closing clause "This does not place an order" further distinguishes it from create_checkout.

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?

It prescribes a concrete workflow (read the cart first, then send every line item to retain) and a precondition (buyer confirmation). It does not name an alternative tool for merging single items, leaving the agent to infer that no such sibling exists.

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.