Skip to main content
Glama
mercadona-mcp
by Syuf1514

Add / change cart items

update_cart

Add products to a Mercadona cart or set exact quantities in one call, including removing an item with quantity 0. Use units/pieces, or kilograms for weighted products; checkout is not included.

Instructions

Add products to the cart or change quantities, in one call. mode 'add' (default) adds to any existing quantity; 'set' sets the exact quantity (0 removes). Quantities are units/pieces (fruit too, e.g. 6 bananas); only products flagged sold_by_weight take kg (e.g. 0.5). Does NOT check out.

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": {
      "items": "<items>"
    },
    "name": "update_cart"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Beyond the annotations (readOnlyHint=false, destructiveHint=false, openWorldHint=true), the description discloses that mode 'set' with quantity 0 removes an item, that quantities are piece counts except for sold_by_weight products which take kg, and that checkout is not performed. That is valuable behavioral context an agent cannot infer from annotations. It does not describe the response or what happens on invalid/unknown product ids, leaving it short of 5. Note the slight tension with destructiveHint=false, since a 'set' to 0 does delete a line item.

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, front-loaded with the core action, then mode semantics, then unit rules, then a scope exclusion. Every sentence adds information and none restates the name or title.

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 single-array mutation tool with annotations present and no output schema, the description covers the action, mode behavior, unit interpretation, and scope boundary — enough to invoke it correctly. It omits error/validation behavior and what the returned cart looks like, which are the remaining gaps.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden, and it does well: it explains the 'mode' enum values and the default ('add'), what 'set' means, that 0 removes, and the unit semantics of 'quantity' (pieces vs. kg based on sold_by_weight). 'product_id' and the array/minItems structure are left to the schema, which is a reasonable gap given they are self-evident.

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?

The description names a specific verb and resource ('Add products to the cart or change quantities') and explicitly bounds scope with 'Does NOT check out,' so an agent knows this is a cart mutation, not an order placement. It stops short of naming which sibling handles removal or bulk imports (remove_from_cart, add_order_to_cart), so routing is clear but not fully disambiguated.

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 gives concrete when-to-use logic for the two modes: 'add' accumulates onto existing quantity, 'set' overrides with an exact quantity, and 0 inside 'set' removes. The 'Does NOT check out' clause excludes the main adjacent action. It provides no explicit pointer to a sibling tool for removals or for adding whole orders/lists, which keeps it below a 5.

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