Skip to main content
Glama
stupidprogrammer4

digikala-mcp

Replace Account Cart

replace_account_cart
DestructiveIdempotent

Replace a user's entire cart with selected exact offers, one unit each, after authorization and offer refresh. Use for approved cart swaps, not checkout or payment.

Instructions

Replace the connected user's entire cart with selected exact offers, one unit each.

Trusted host must have explicit authorization for clearing this account's cart and adding these items. Refreshes all offers before any removal. Reuse request_id for retries; uncertain/partial outcomes never blindly resend writes. No checkout/payment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
replacementYes
session_tokenYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
cartNo
stateYes
reasonNo
request_idYes

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 declare destructiveHint, idempotentHint and openWorldHint, yet the description adds non-obvious behavior: that it refreshes all offers before any removal, that explicit host authorization is required to clear the cart, and how to handle uncertain/partial write outcomes without blind resends. This is material context an agent could not derive from the structured fields.

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?

Four sentences, front-loaded with the core action, then authorization, refresh behavior, retry semantics, and scope boundary in descending order of importance. Dense but no filler; each clause carries distinct information.

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 not be described, and annotations cover the safety profile. The description supplies authorization, refresh, retry and scope context, leaving only the price-related parameter semantics under-explained for a zero-coverage nested schema.

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% and the schema is nested (replacement.items[].product_id/offer_id/seller_id/expected_price_rial, max_total_rial). The description does explain request_id reuse for retries and implies one-unit-per-item semantics, but says nothing about max_total_rial or expected_price_rial's role as a price guard, so it only partially compensates for the coverage 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?

States a specific verb and resource with scope ('Replace the connected user's entire cart with selected exact offers, one unit each'), which clearly separates it from add_to_account_cart/update_account_cart_item (incremental edits) and read_account_cart (read). No sibling is named explicitly, so differentiation rests on the phrase 'entire cart' rather than an explicit pointer.

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 real preconditions ('Trusted host must have explicit authorization for clearing this account's cart') and a retry policy ('Reuse request_id for retries; uncertain/partial outcomes never blindly resend writes'), plus an explicit scope exclusion ('No checkout/payment'). It does not, however, say when to prefer prepare_account_cart_change or reconcile_account_cart_operation over calling this directly.

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