Skip to main content
Glama

update_cart_item

DestructiveIdempotent

Set the absolute quantity of an item in this buyer's basket. Quantity zero removes it. OAuth scopes: cart:write. Changes buyer or order state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
item_idYesBasket line item_id from this consenting buyer's get_cart response, not product_id or another buyer's item.
quantityYesNew ABSOLUTE quantity for this basket line, not an increment. Zero removes the line.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
emptyYes
itemsYes
currencyYes
subtotalYes
orderableYes
total_quantityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.3/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=true and readOnlyHint=false, so the safety profile is covered. The description adds genuinely new context: the required OAuth scope and that the call mutates buyer/order state, plus the concrete destructive behavior of quantity=0. It stops short of 5 only because it doesn't quantify side effects beyond the removed line.

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?

Three short sentences, front-loaded with the core action and edge case, then scope and state impact. No filler, no restating of the title.

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?

With an output schema present, return values need no explanation, and annotations cover safety semantics. The description fills the remaining gaps an agent needs — auth scope, absolute-set semantics, and the zero-removal behavior — so nothing material is missing for a two-parameter tool.

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 already spell out 'ABSOLUTE quantity... not an increment' and the item_id sourcing rule, so the description largely restates what the schema says. Baseline 3 applies since the schema carries the parameter burden.

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 gives a specific verb+resource ('Set the absolute quantity of an item in this buyer's basket') and the word 'absolute' implicitly separates it from the incrementing add_cart_item sibling. 'Quantity zero removes it' further demarcates it from remove_cart_item. An agent can route to this tool without opening any 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?

It supplies clear operating context — the required OAuth scope (cart:write) and the zero-quantity edge case that effectively substitutes for remove_cart_item. It does not, however, explicitly name alternatives or state when to prefer add_cart_item over this tool, so it stops short of full when/when-not guidance.

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