Skip to main content
Glama
rewe-mcp

rewe-mcp

by Robert-SD

Set Product Quantity in REWE Basket

rewe_set_basket_item
Idempotent

Add a product listing to a REWE Pickup or Delivery basket, or update its absolute quantity; set quantity to 0 to remove the item.

Instructions

Add a product listing to your REWE Pickup/Delivery basket or update its absolute quantity (set quantity: 0 to remove the item).

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": {
      "listingId": "<listingId>",
      "quantity": "<quantity>"
    },
    "name": "rewe_set_basket_item"
  }
}

Input Schema

NameRequiredDescriptionDefault
versionNoOptional basket version for optimistic concurrency (auto-resolved if omitted).
zipCodeNoGerman postal code (PLZ, e.g. '50667'). Defaults to the configured zip code.
basketIdNoOptional basketId from rewe_get_basket (auto-resolved if omitted).
marketIdNoREWE market identifier (wwIdent, e.g. '840174'). Defaults to the configured market.
quantityYesAbsolute quantity to set in the basket (0 removes the item).
listingIdYesProduct listingId from rewe_search_products or rewe_get_favorites.
serviceTypeNoREWE service type ('PICKUP' for Abholservice or 'DELIVERY' for Lieferservice).

Output Schema

NameRequiredDescriptionDefault
idYes
itemsYes
versionNo
zipCodeYes
marketIdYes
itemCountYes
totalPriceNo
serviceTypeYes
totalQuantityYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false and idempotentHint=true; the description adds the non-obvious behavior that quantity is absolute rather than additive and that quantity 0 deletes the line item, which is exactly the detail an agent needs before calling a write tool. It does not mention auth or market/zip resolution, but the important write semantics are disclosed. Removal via quantity 0 sits in mild tension with destructiveHint=false, though a basket line removal is trivially reversible rather than a destructive data change.

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?

A single sentence with the primary action front-loaded and the removal caveat parenthesized at the end. There is no redundant restatement of the title or padding.

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?

With an output schema present and full parameter documentation, the description only needs to convey the operation's semantics, which it does. The remaining gap is contextual prerequisites (selected market, authenticated basket), which an agent would need to infer from sibling tools such as rewe_get_basket and rewe_set_selected_market.

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 coverage is 100%, so every parameter including quantity, listingId, basketId, marketId, zipCode and version is already documented with types, bounds and defaults. The description echoes the absolute-quantity and zero-removes semantics already present in the quantity field description, adding little beyond the schema. Baseline 3 is appropriate when the schema carries the load.

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 verb and resource ('Add a product listing to your REWE Pickup/Delivery basket') and covers the full mutation surface: add, update to an absolute quantity, and remove via quantity 0. This clearly separates it from the only read-side basket sibling, rewe_get_basket.

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 clear context for use (adding items or changing quantities in an existing basket) and disambiguates set-vs-increment by stating the quantity is absolute. It stops short of naming an alternative tool or stating preconditions such as needing a selected market or authenticated session.

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