Skip to main content
Glama
MRVDH
by MRVDH

Add to cart

add_to_cart

Adds products to a Picnic shopping cart by product ID, returning successful additions, failed items, unavailable products with replacements, and the updated cart total. Does not place an order.

Instructions

Add one or more products to the user's Picnic shopping cart. Get the product ids from search_products first; put all products the user asked for in one call (at most 20). Returns each added product with the quantity now in the cart, the products that failed, and the cart total. A product that can't be delivered in the selected delivery window has unavailable and replacements: tell the user and offer them. To change how many of a product are in the cart ("make it 4"), use set_cart_quantity instead. This does not place an order.

Input Schema

NameRequiredDescriptionDefault
itemsYesThe products to add, e.g. [{"productId": "s1004201", "quantity": 2}].

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare a non-read-only, non-destructive, open-world mutation, and the description adds genuine context beyond that: the return payload (each added product with resulting quantity, failures, cart total), plus the unavailable/replacements flow telling the agent to surface substitutions to the user. That is exactly the kind of post-call behavior an agent cannot infer from annotations.

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?

Front-loaded with the action, then sourcing, batching, return shape, edge case, alternative, and boundary — each sentence carries distinct information with no restatement of the schema or annotations.

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

Completeness5/5

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

No output schema exists, yet the description explains the return values and the failure/replacement path, and it flags the ordering boundary. For a one-parameter nested-array mutation tool, an agent has everything needed to call and interpret it correctly.

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 100%, so the baseline is 3; the description still adds value by stating the per-call cap of 20 and the aggregate semantics of the items array (all requested products in one call). It does not restate quantity defaults or formats, which the schema already covers, so it stops short of 5.

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?

Specific verb ('Add') plus resource ('products to the user's Picnic shopping cart') with explicit scope (one or more, max 20 in one call). It distinguishes itself from the two nearest siblings by naming set_cart_quantity for quantity changes and implying remove_from_cart's counterpart role.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Gives prerequisites (get product ids from search_products first), batching guidance (put all requested products in one call), an explicit alternative ('make it 4' → set_cart_quantity), and a boundary ('This does not place an order'). When-to-use is unambiguous.

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