Skip to main content
Glama

Add to cart

add_to_cart

Adds specified units of a product to an existing grocery cart and reads the cart back to confirm the updated quantity.

Instructions

Adds units of a product on top of those already present, then reads the cart back to confirm.

Input Schema

NameRequiredDescriptionDefault
storeYesretailer (see list_stores)
quantityNosale units to add
product_idYesretailer product identifier (id field of search_products)

Output Schema

NameRequiredDescriptionDefault
lineYes
storeYes
confirmedYestrue if the cart read back holds the targeted quantity
product_idYes
cart_total_eurYes
expected_quantityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare mutation, open-world behavior, and non-idempotency. The description adds useful context beyond them by clarifying that quantities accumulate and that the cart is read back afterward to confirm the result.

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?

The definition is a single focused sentence with no filler. The key accumulation behavior is front-loaded and immediately followed by the read-back confirmation.

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 the description need not explain return values, and annotations cover the safety profile. It clearly describes the mutation and read-back behavior, though it could have explicitly contrasted with set_quantity for fuller guidance.

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 the parameter schemas already document product_id, store, and quantity. The description reinforces the quantity increment concept but adds no syntax, constraints, or format details beyond the schema.

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?

The description uses a precise verb and resource: it adds units of a product to the cart. The phrase 'on top of those already present' clearly establishes increment semantics, which meaningfully distinguishes it from the sibling tool set_quantity.

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 increment behavior implies when to use this tool rather than set_quantity, but the description never names that alternative or states explicit when-not conditions. Usage is inferable but not spelled out.

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