Skip to main content
Glama
NyokolodiK

ecommerce-mcp

by NyokolodiK

update_cart_item

Change the quantity of a product in a cart. Provide the cart ID, product ID, and new quantity to update the line item.

Instructions

Overwrite the quantity of a product line in a cart.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cart_idYesUnique cart identifier.
requestYesInput contract for the ``update_cart_item`` tool.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsNoLine items currently in the cart.
cart_idYesUnique cart identifier.
created_atYesUTC timestamp of cart creation.
updated_atYesUTC timestamp of the last modification.
Behavior4/5

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

With no annotations, the description carries the full behavioral burden. It clearly communicates the mutation ('overwrite') and the scope (quantity of a line item), which is transparent for this simple operation. It does not discuss side effects or errors, but the existence of an output schema covers return values, and the description is not misleading or incomplete for the core behavior.

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?

The description is a single sentence with no filler. It is front-loaded and directly states the action and target, making it easy to scan and understand.

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

Completeness4/5

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

For a simple mutation tool with two parameters (including a nested object) and an output schema, the description covers the core purpose and is sufficient. It does not mention preconditions (e.g., item must already exist in the cart) or how to obtain product_id, but the sibling context and schema partially compensate. Overall, it is adequate given the tool's simplicity.

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%, so the schema already documents both parameters (cart_id and request) with descriptions and constraints. The description adds no parameter-specific meaning beyond the word 'quantity', which does not exceed what the schema already states. This meets the baseline for full schema coverage.

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 uses the specific verb 'overwrite' and names the exact resource ('quantity of a product line in a cart'), clearly distinguishing it from sibling tools like add_to_cart or remove_cart_item. It is immediately clear what action is performed.

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?

No explicit guidance on when to use this tool versus alternatives is provided. The name and wording imply usage for updating an existing cart line's quantity, but there is no mention of prerequisites, scenarios where this is preferred, or when another tool (e.g., add_to_cart) would be more appropriate.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/NyokolodiK/ecommerce-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server