Skip to main content
Glama
Yandex Lavka Uzbekistan MCP
by d3d0n

set_cart_item

Set a cart item to an exact quantity, using 0 to remove it; provide the current search price for the explicit cart write.

Instructions

Change cart item to an absolute quantity (0 removes). Explicit cart write; price must be from current search. Never retries ambiguous writes.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "longitude": "<longitude>",
      "latitude": "<latitude>",
      "product_id": "<product_id>",
      "quantity": "<quantity>",
      "price": "<price>"
    },
    "name": "set_cart_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
priceYes
latitudeYes
quantityYes
longitudeYes
product_idYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

B3.1/5.0
Behavior3/5

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

With no annotations, the description must carry the whole behavioral burden; it does disclose that this is an explicit write, that quantity 0 destroys/removes the item, and it warns "never retries ambiguous writes" (a real durability/safety trait). It omits authentication needs, whether the whole cart or a single line is replaced, and what the response contains.

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?

Three short, front-loaded sentences with no padding; the core semantics (absolute quantity, 0 removes) come first. "Never retries ambiguous writes" is telegraphic and slightly ambiguous as written, but nothing is wasted.

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?

Five required parameters, zero schema descriptions, no annotations, and no output schema make this a data-poor definition where the description must do more. It covers the write semantics and price precondition but leaves the geolocation parameters and the return behavior completely unaddressed.

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 coverage is 0%, so all five parameters need meaning from prose; the description only explains quantity (absolute, 0 removes) and price (must come from current search). product_id is inferable from the tool name, but latitude/longitude — required on a cart-line write — are entirely unexplained, which is a significant 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?

"Change cart item to an absolute quantity (0 removes)" gives a specific verb, resource, and semantics, and the word "absolute" implicitly distinguishes it from any increment/decrement behavior. It does not name a sibling for contrast (no add/update sibling is visible), but an agent can tell it is a cart mutation rather than a read like get_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?

"price must be from current search" is a real precondition that steers the agent to call search_products first, and "(0 removes)" clarifies the boundary case. However, there is no explicit statement of when to choose this over related tools (checkout_preview, order_preview, get_cart) or what to do if the item is not yet in the cart.

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