Skip to main content
Glama

Add / update cart item

zoodex_cart_set_item

Sets the absolute quantity of a product variety in a cart, including extras and kitchen notes; use 0 to remove an item or an existing cart line ID to update it.

Instructions

Set the quantity of a product variety in the cart (quantity is absolute, not a delta; 0 removes it). Use variety_id from search/menu results. If the product has additionals (extras/options), pass their ids. To change an existing line (e.g. with different additionals) pass its product_cart_id from zoodex_cart_view. Works logged out (guest cart, merged on login).

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": {
      "variety_id": "<variety_id>",
      "quantity": "<quantity>"
    },
    "name": "zoodex_cart_set_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
noteNoItem note for the kitchen, e.g. 'no onions'.
quantityYes
variety_idYesvariety_id from zoodex_search / zoodex_vendor_menu / zoodex_find_best_deals.
additionalsNoAdditional/extra option ids.
product_cart_idNoExisting cart line id to update.
zoodex_plus_onlyNoSet for items marked only_plus (Zoodex Plus members only).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations only declare readOnly/destructive/openWorld hints; the description adds materially more — absolute vs. delta quantity semantics, silent removal on 0, and guest-cart behavior with merge-on-login. That guest/merge detail is operationally important and appears nowhere in the structured fields. It stops short of describing failure modes (e.g. invalid product_cart_id, plus-only rejection) or the response, which keeps it from a 5.

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 short sentences, each delivering a distinct decision-relevant fact, with the core semantics front-loaded in the first clause. No filler, no restatement of the title.

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 6-parameter mutation tool with no output schema, the definition covers id sourcing, update-in-place behavior, and guest mode — enough to invoke correctly. It omits any mention of the quantity cap of 99 or of zoodex_plus_only gating (both only in the schema), and gives no hint of what the cart state looks like afterward, leaving the agent to call zoodex_cart_view blindly.

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 coverage is already 83%, so the baseline is 3; the description earns above that by explaining the absolute-quantity contract for quantity, cross-tool provenance for variety_id and product_cart_id (which the schema only labels generically as 'Existing cart line id to update'), and when additionals applies. The note and zoodex_plus_only parameters are left entirely to the schema, which is acceptable given the high coverage.

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?

Opens with a specific verb+resource: 'Set the quantity of a product variety in the cart,' and immediately clarifies the semantics (absolute, not delta; 0 removes it). That parenthetical alone distinguishes it from zoodex_cart_remove_item and zoodex_cart_remove_vendor, so an agent can route without opening schemas.

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?

Gives concrete pre-call guidance: take variety_id from search/menu results, pass additionals ids when the product has extras, and use product_cart_id sourced from zoodex_cart_view to edit an existing line. It does not explicitly state when to prefer it over zoodex_cart_remove_item for removal, but the '0 removes it' clause covers that path implicitly.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.