Skip to main content
Glama

Add to cart

cart_add_item

Add a configured product to the cart. Use product_configure first for required variant option ids.

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>",
      "productId": "<productId>"
    },
    "name": "cart_add_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
notesNoOptional line item notes.
storeIdYesOkam store id.
quantityNoQuantity to add.
productIdYesProduct id from menu_list.
selectedOptionIdsNoSelected 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.8/5.0
Behavior3/5

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

Annotations already declare this as a non-read-only, non-destructive, closed-world write, so the safety profile is covered. The description usefully adds the product_configure prerequisite chain, but says nothing about duplicate-line behavior, whether quantity merges with an existing line, or what happens when required option ids are missing.

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?

Two short sentences, zero padding, with the primary action front-loaded and the prerequisite immediately after it. Every clause earns its place.

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?

An output schema exists, so return-value explanation is not required, and the annotations carry the safety profile; the description supplies the missing cross-tool sequencing. Only edge-case behavior for repeated adds or invalid option ids is absent, which is a minor gap for a straightforward add-to-cart mutation.

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 description coverage is 100%, so every parameter is already documented in the input schema and the baseline is 3. The description adds only marginal meaning by implying selectedOptionIds originate from product_configure; it adds no format, default, or validation detail beyond the schema.

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?

"Add a configured product to the cart" states a specific verb and resource, and the word "configured" signals the dependency on prior configuration. It is clearly distinguishable from cart_remove_item and cart_update_item by name, though the description never explicitly contrasts with them.

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 gives an explicit ordering rule — call product_configure first to obtain required variant option ids — which is exactly the kind of when-to-use guidance an agent needs before invoking a cart mutation. It stops short of saying how it differs from cart_update_item or what to do on a duplicate add, so no exclusions are covered.

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