Skip to main content
Glama

shop

Cart

edit_cart
Destructive

Change or read the order's cart. ops: add (increase), set (exact quantity) or remove, per product id; no ops reads the cart. Quantities count packages: one package holds pricing.package.pieces pieces (100 pieces of a 6-piece package is 17 packages); search with quantity {pieces} gives for_quantity ready. Stock limits a quantity and clamped lines say so; tier prices and discounts apply by themselves. The answer carries minimum (the minimum order amount and whether it is reached), lines[].hints (overbox and staffel savings), also (products often bought together) and, for a line short of stock, lines[].replacements with ready actions. Offer one when it helps the shopper, ask before changing their order, and put hint (overbox, break, also or replace) on the op they accepted. The cart is frozen while a payment is open (cancel_payment stops it) and after the order is placed. Needs the order reference from start_order (Authorization: Bearer mo1_… or the ref argument). Send a fresh op_id (16 to 40 letters, digits, - or _) with each change: a repeat with the same op_id within 10 minutes answers the first result and never changes the order twice.

Input Schema

NameRequiredDescriptionDefault
opsNoChanges in order; leave out to read the cart
refNoOrder reference (mo1_…) from start_order, only when the client cannot send it as Authorization: Bearer
op_idNoA fresh id per change (16 to 40 letters, digits, - or _); repeating it within 10 minutes answers the first result without changing the order again

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Goes well beyond the annotations: the cart freezes while a payment is open and after placement, quantities are clamped to stock with the response saying so, tier prices and discounts apply automatically, and op_id gives 10-minute deduplication. The conditional idempotency via op_id is an addition to idempotentHint=false rather than a contradiction, since it is scoped to a repeated id.

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?

Front-loads purpose and op semantics before moving to response shape, freeze rules, auth, and idempotency. It is dense and slightly run-on in places (the packages/pieces example, the hint sentence), but nearly every clause carries operational information.

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?

Despite no output schema, the description explains the meaningful return fields (minimum, lines[].hints, also, lines[].replacements) and their use. Auth (Bearer mo1_… or ref), the start_order prerequisite, and the frozen-cart states are all covered, which is thorough for a destructive multi-op tool.

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

Parameters5/5

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

Schema coverage is already 100%, yet the description still adds meaning: the packages-vs-pieces unit rule (100 pieces of a 6-piece package is 17 packages), the link between search quantity.pieces and for_quantity, the op_id format and 10-minute replay window, and when ref is needed. This is real semantic value on top of 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?

States a specific verb and resource ('Change or read the order's cart') and enumerates the three op types (add/set/remove) keyed by product id, plus the read case when ops is omitted. An agent can tell exactly what the tool mutates or returns without opening the schema.

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?

Gives concrete when-to guidance: offer products/hints when it helps the shopper, ask before changing their order, and tag the accepted hint on the op. It also names cancel_payment as the way to unfreeze a cart during an open payment. It does not contrast with view_checkout/set_checkout siblings, which would be the finishing touch.

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