Skip to main content
Glama

update_cart

Destructive

Apply confirmed final quantities to the shopping cart, verifying the cart version to prevent stale updates.

Instructions

Set exact final quantities after the host obtains explicit user confirmation.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYes
operation_idYes
expected_cart_versionYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.1

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already flag the tool as destructive, so the description adds value by specifying what is destructive: the quantities are set to exact final values, not adjusted by deltas. It also communicates the need for explicit user authorization before invocation. It does not detail edge cases like item removal at quantity 0, but the core behavioral risk is disclosed.

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?

One short sentence with no filler and the most important operational constraint (user confirmation) included. Every word earns its place.

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?

For a destructive, 3-required-parameter mutation, this is too thin: the version-check parameter and operation_id are critical for safe invocation and are left to inference from their titles. The output schema relieves return-value documentation, but the description should still explain the concurrency precondition and how items map to final cart state.

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%, and the description only weakly maps to the 'quantity' field via 'quantities.' The required 'expected_cart_version' and 'operation_id' parameters are completely unexplained, leaving the agent without guidance on concurrency or idempotency semantics.

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 names a specific action ('Set exact final quantities') and a clear resource context (cart items), which distinguishes it from sibling read/search tools like get_cart/get_product. The 'exact final' wording also signals overwrite semantics rather than an incremental update.

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 provides an explicit precondition: only call 'after the host obtains explicit user confirmation,' which tells the agent when it is allowed to act. It does not name specific sibling alternatives, but no sibling performs cart mutation, so the confirmation gate is the main routing guidance.

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