Skip to main content
Glama
stupidprogrammer4

digikala-mcp

Update Cart Item

update_cart_item
DestructiveIdempotent

Update a cart item's quantity using an approved plan. Requires user approval and avoids duplicate writes via plan ID tracking.

Instructions

PATCH final quantity using an approved update plan. Never call without user approval.

Increases obey both limits. Decreases are allowed even above the limits. Reusing plan_id never resends the write, including after a restart or timeout.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
plan_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cartNo
stateYes
reasonNo
plan_idYes
limits_exceededNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior5/5

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

Annotations already flag this as destructive, idempotent and open-world, and the description adds substantial non-obvious behavior: increases are bound by both limits while decreases may exceed them, and reusing a plan_id suppresses the write even across restarts or timeouts. That idempotency/retry semantics is exactly the kind of context annotations cannot convey.

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?

Four short sentences, each carrying distinct information (action, precondition, limit rules, idempotency), with the operation and approval gate front-loaded. No filler.

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?

An output schema exists so return values need no explanation, and the description covers preconditions, limit behavior and retry semantics. The only real omission is the provenance of plan_id (which sibling issues it), a minor but relevant gap.

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 0%, so the description carries the burden for the single plan_id parameter. It implicitly characterizes plan_id as an idempotency key via the reuse semantics, but never states its format (32-hex) or where to obtain it, leaving meaningful gaps.

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 operation (PATCH the final quantity) against a specific resource (cart item) executed via an 'approved update plan'. It clearly implies the plan-based workflow, though it never names the sibling that produces the plan (prepare_cart_change) or distinguishes itself from update_account_cart_item.

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?

Gives a hard precondition: 'Never call without user approval', plus the requirement of an approved update plan. This is clear usage context, but no explicit when-not or named alternative sibling is provided, so it falls short of a 5.

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