Skip to main content
Glama

Aari Clothing — Premium Menswear, Activewear & Footwear

replace_cart_item_variant

Replace one cart item with another variant, such as switching size or color.

Input Schema

NameRequiredDescriptionDefault
cart_idNocurrent
line_idNo
quantityNo
buyer_contextNo
cart_scope_idNo
new_variant_idYes
old_variant_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.9/5.0
Behavior2/5

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

With no annotations, the description carries the full burden and delivers almost nothing: no mention of whether the replacement is atomic, whether quantity is preserved or reset, what happens if old_variant_id or line_id is omitted, or whether the operation requires an active cart session. For a 9-parameter mutation tool this is a serious 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 wasted words and the key example placed immediately after the purpose. Brevity is appropriate, though it comes partly at the cost of completeness.

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

Completeness2/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 needn't be explained, but the description still leaves a mutation tool with nine parameters and zero annotation coverage badly under-described. An agent cannot safely determine how to target the line being replaced.

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%, so the description should compensate for nine undocumented parameters, yet it explains none of them. The ambiguity between line_id and old_variant_id, the cart_id default of "current", and the role of cart_scope_id, cart_session_id, buyer_context, and source_surface are all left unaddressed.

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?

States a specific verb and resource ("Replace one cart item with another variant") with a concrete example ("switching size or color"). That distinguishes it from add_to_cart and remove_from_cart, but it never names a sibling or explains why it beats update_cart.

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

Usage Guidelines3/5

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

The size/color example implies when to use it, but there is no explicit guidance on when not to use it versus add_to_cart, update_cart, or update_cart_item_quantity, nor any stated prerequisites.

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