Skip to main content
Glama

add_cart_item

Add an item to an existing same-store cart or a specified cart, creating a new cart if none exists. Other carts stay intact; option IDs come from get_menu_item_options.

Instructions

Add an item to an explicit cart or the existing same-store cart; otherwise create one. Preserves other carts. Option IDs come from get_menu_item_options. Do not blindly retry on unknown outcome.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cart_idNo
item_idYes
optionsNo
quantityNo
store_idYes
special_instructionsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.6/5.0
Behavior4/5

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

Annotations already declare readOnly=false, destructive=false, idempotent=false, so safety is partly covered. The description adds real value beyond them: the cart-creation side effect, the 'preserves other carts' blast-radius statement, the option-ID provenance from get_menu_item_options, and the retry caution that operationalizes idempotentHint=false.

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?

Four short sentences, each carrying a distinct rule, with the add/resolution behavior front-loaded and the retry warning placed last where it matters most. No filler, though the option-ID sentence is a cross-reference rather than core semantics.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a mutating, non-idempotent tool with 6 parameters, a nested options array, and no output schema, the description covers the operation and cart behavior well but says nothing about quantity, special instructions, or what the call returns. Adequate but with clear gaps given the 0% schema coverage.

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

Parameters2/5

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

Schema description coverage is 0% across 6 parameters, so the description carries the full burden. It only gestures at cart_id ('explicit cart'), store_id ('same-store cart'), and option IDs; quantity, special_instructions, the nested option/quantity structure, and all defaults are left completely unexplained.

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?

The description opens with a specific verb+resource (add an item to a cart) and goes further by defining the cart-resolution rule: explicit cart_id, else existing same-store cart, else create one. It does not explicitly distinguish itself from the sibling update_cart_item, so it stops short of a 5, but the core operation is unambiguous.

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 clearly states which branch is taken for cart selection (explicit vs same-store vs create) and gives a genuine 'when not to' instruction: 'Do not blindly retry on unknown outcome.' It does not tell the agent when to prefer this over update_cart_item or remove_cart_item, so it is short of explicit alternatives.

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