Skip to main content
Glama
MRVDH
by MRVDH

Set cart quantity

set_cart_quantity
Destructive

Set the quantity of a product in a Picnic shopping cart; use 0 to remove it. Returns the updated quantity and cart total.

Instructions

Set how many of a product are in the user's Picnic shopping cart, e.g. when the user says "make it 3". 0 removes the product. Get the product id from get_cart or search_products. Returns the quantity now in the cart and the cart total.

Input Schema

NameRequiredDescriptionDefault
quantityYesHow many should be in the cart. 0 removes the product.
productIdYesThe product id from search_products or get_cart, e.g. s1004201.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, openWorldHint=true, and destructiveHint=true, so the safety profile is established. The description adds useful behavioral detail beyond annotations: quantity 0 removes the product, and the call returns the quantity now in the cart plus the cart total. It does not mention auth or rate limits, but the annotation coverage lowers that burden.

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 description is three tight sentences that front-load the purpose, then explain the key quantity-0 behavior and productId source, then state the return values. Every sentence adds relevant information and there is no filler.

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?

Although there is no output schema, the description explicitly says it returns the quantity now in the cart and the cart total. The input schema covers parameter bounds and formats, and annotations cover the safety profile, so an agent has enough to invoke and interpret the tool correctly.

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%, and both parameters are fully documented in the input schema, including the productId pattern and the quantity 0-removal behavior. The description largely repeats that schema information (productId source and 0 removal) without adding new syntax or meaning, so the baseline 3 is appropriate.

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 states a specific verb, resource, and scope: setting the absolute quantity of a product in the user's Picnic cart. The example "make it 3" and the note that 0 removes the product distinguish it from add_to_cart and remove_from_cart, which adjust quantity incrementally rather than setting it directly.

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 a clear usage context ("when the user says 'make it 3'") and states the prerequisite for obtaining productId from get_cart or search_products. It does not explicitly contrast when to use this versus add_to_cart/remove_from_cart or state when not to use it, so it falls short of full alternative routing.

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