Skip to main content
Glama

Preview basket

preview_basket
Read-onlyIdempotent

Preview intended cart quantity changes without altering the cart, showing availability, pack details, estimated cost, and whether each would add, increase, decrease, remove, or be refused.

Instructions

Check products and the total wanted of each before changing the cart, without changing anything. For each: what the cart holds, what set_cart_item_quantity would do (add, increase, decrease, remove or none), why it would be refused (such as a minimum or step), availability, pack details and the estimated cost. Reads one product page per item, at most 30. Prices and stock can change before you apply it.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesProducts and the total you want of each, at most 30.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.10.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations (readOnly, idempotent, non-destructive): it discloses the per-item cost (one product page read per item, max 30), the fields returned (current cart state, predicted add/increase/decrease/remove/none, refusal reasons like minimums or steps, availability, pack details, estimated cost), and the staleness caveat that prices and stock can change before applying.

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?

Dense but front-loaded: the read-only preview purpose comes first, followed by the predicted outcomes and then the operational caveats. Every clause carries information, though the outcome enumeration is long enough to approach a wall of text.

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?

For a dry-run tool with a read-only annotation set and an output schema, the description supplies everything an agent needs to invoke it correctly: item cap, per-item read cost, what each entry reports, refusal semantics, and the staleness warning. Return-value explanation is not required given the output schema, and the description covers it anyway.

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 the nested items schema already documents quantity units, zero-means-remove, productId slug handling, and cartItemId line selection. The description only restates 'the total wanted of each' and the 30-item cap, adding no semantics the schema lacks, so the baseline 3 applies.

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 action (preview/dry-run of basket changes) on a specific resource (products, quantities, cart totals), and explicitly frames it against the sibling that performs the mutation: 'what set_cart_item_quantity would do'. An agent can tell it apart from set_cart_item_quantity and get_cart without further reading.

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?

Clearly signals the context of use: check before changing the cart, without changing anything. It names set_cart_item_quantity as the tool whose effect it predicts, which is strong routing guidance. It does not explicitly state when not to use it (e.g. when the cart is already correct), so it falls short of a full 5.

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