Skip to main content
Glama

Trailberg — Activewear, Tracksuits & Footwear

update_cart_item_quantity

Set the quantity of one cart item by line_id or variant_id in the current store cart.

Input Schema

NameRequiredDescriptionDefault
cart_idNocurrent
line_idNo
quantityYes
variant_idNo
buyer_contextNo
cart_scope_idNo
source_surfaceNocart
cart_session_idNo

Output Schema

NameRequiredDescriptionDefault
typeNocart_result
emptyNo
itemsNo
cartIdNo
totalsNo
messageYes
storeIdYes
snapshotAtNo
cartScopeIdNo
cartVersionNo
continueUrlNo
emptyReasonNo
snapshotModeNocurrent
cartSessionIdNo
lineItemCountNo
cartSessionStateNoactive

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

C2.8/5.0
Behavior2/5

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

No annotations are provided, so the description carries the full behavioral burden. 'Set the quantity' usefully implies an absolute replacement rather than an increment, but it says nothing about whether quantity=0 removes the line, what happens when the referenced line or variant is absent, permission/auth requirements, or whether the mutation is reversible. For an unannotated write tool this is a significant gap.

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?

A single front-loaded sentence with no filler that puts the verb, the target, and the alternative identifiers up front. It is slightly under-specified for a tool with this parameter surface, but the sentence itself wastes nothing.

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

Completeness3/5

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

An output schema exists, so return values need not be described, and the core operation is conveyed. However, with 8 parameters at 0% schema coverage and no annotations, an agent still lacks the meaning of four session/context parameters and the removal semantics at quantity=0, which is more than a minor omission for a mutation tool.

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

Parameters2/5

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

Schema description coverage is 0% across 8 parameters, and the description only covers quantity, line_id, variant_id, and loosely the cart. cart_scope_id, cart_session_id, buyer_context, and source_surface are entirely unexplained, and the interaction between the two targeting identifiers is left unstated, so the description compensates poorly for the coverage gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description names a specific verb and resource ('Set the quantity of one cart item') and identifies the two addressing modes (line_id or variant_id), which separates it from add_to_cart and remove_from_cart. It does not explicitly distinguish itself from the sibling update_cart, leaving some ambiguity about which tool to pick for cart-level edits.

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

Usage Guidelines2/5

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

There is no guidance on when to use this versus update_cart, replace_cart_item_variant, or remove_from_cart, and no explanation of what quantity=0 does or which identifier takes precedence when both line_id and variant_id are supplied. The only implicit guidance is 'in the current store cart', which rests on a default rather than stated policy.

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