Skip to main content
Glama

set_cart_quantities

DestructiveIdempotent

Set absolute quantities in one store's cart; use 0 to remove products. Returns a cart URL to review and pay—it never orders or pays.

Instructions

Set ABSOLUTE quantities in one store's cart (0 removes the product). Never orders or pays. Product ids come from search_products, compare_basket or list_offers. Returns a result per product and the new cart with its url: give the human that link to check and pay. REMA 1000: sets the shopping list "handle-mcp", never another list.

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

Input Schema

NameRequiredDescriptionDefault
itemsYesProduct id → absolute count, e.g. {"5012345": 2, "5098765": 0}.
storeYesOne store: "nemlig", "bilkatogo" or "rema1000".

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changedv1.7.1
    • addedInput schema / properties / items / description
      Added value: +"Product id → absolute count, e.g. {\"5012345\": 2, \"5098765\": 0}."
    • addedInput schema / properties / store / description
      Added value: +"One store: \"nemlig\", \"bilkatogo\" or \"rema1000\"."
  2. First observedv0.1.0

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already flag destructive/idempotent/non-read-only, and the description adds genuinely new behavior: zero-count deletes, that no order or payment occurs, that a per-product result plus the new cart with url is returned, and a store-specific quirk where REMA 1000 always writes the 'handle-mcp' list and never another. That last detail is the kind of side effect an agent could not infer from any structured field.

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?

Front-loaded with the core verb and semantics, and nearly every sentence carries operational value. The telegraphic fragments ('REMA 1000: sets the shopping list "handle-mcp", never another list.') are dense but slightly clipped in a way that costs a little readability.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

There is no output schema, and the description compensates by describing both the per-product result and the returned cart with its url. For a destructive nested-object mutation tool, the caller knows the effect, the side effects, id sourcing, and what comes back.

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 100%, so the baseline is 3, but the description adds meaning beyond the schema by stressing that counts are ABSOLUTE and where valid product ids originate. The store parameter's enum-like values and the id→count map are already documented in the schema, so the marginal gain is real but not sweeping.

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?

States a specific verb and resource ('Set ABSOLUTE quantities in one store's cart') and immediately clarifies the semantics with '(0 removes the product)', which distinguishes it from any increment-style sibling. 'Never orders or pays' rules out the most likely misreading of a cart tool.

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 clear operating context: product ids come from search_products, compare_basket or list_offers, and the returned url is meant for the human to check and pay. It does not explicitly contrast with add_recipe_to_cart or say when to prefer this over other cart mutations, so the alternative-selection guidance is implicit rather than stated.

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