Skip to main content
Glama

add_to_basket

Adds a product to the user's basket or updates its target quantity if already present, returning the updated basket. Requires authentication.

Instructions

Add a product to the user's basket (or set its quantity if already present). The underlying API is upsert-to-target, not increment. Returns the updated basket. Requires authentication.

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": {
      "productId": "<productId>"
    },
    "name": "add_to_basket"
  }
}

Input Schema

NameRequiredDescriptionDefault
quantityNoTarget quantity. Defaults to 1. REPLACES existing quantity, not increment.
productIdYesProduct UID from search_products (e.g. '100049709').
shoppingListIdNoOptional list ID from get_shopping_lists; omit to use the first list.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.1

TDQS

A3.8/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full burden and does real work: it discloses the upsert-to-target semantics ('not increment'), which is the single most likely source of caller error, and states the return value ('Returns the updated basket') and the auth requirement. It does not cover failure modes, such as what happens with an invalid productId or a list the user cannot access.

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?

Three short sentences, each earning its place, with the highest-value fact (upsert, not increment) surfaced first. No filler, no restating of the tool name.

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 three-parameter mutation with no annotations and no output schema, the definition covers semantics, return value, and auth. The only meaningful gap is the absent routing versus its closest sibling, update_basket_quantity.

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 already 100%, and the description adds no parameter-level meaning beyond it — the REPLACES-not-increment note is even repeated verbatim in the quantity field. This is the baseline case where the schema does the heavy lifting and the description neither compensates nor adds value.

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?

Names a specific verb and resource ('Add a product to the user's basket') and immediately clarifies the semantics with '(or set its quantity if already present)'. This disambiguates the behavior, but it never names the sibling update_basket_quantity that overlaps with this behavior, leaving the agent to infer which one to prefer.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

'Requires authentication' gives one useful precondition for calling it. Beyond that there is no when-to-use framing: nothing says whether to prefer this over update_basket_quantity for changing an existing line, nor any guidance about the optional shoppingListId path versus get_shopping_lists.

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