Skip to main content
Glama

Add a product to the web visitor cart

web_add_to_cart

Add a product to the Alza visitor cart by numeric commodity ID to start web checkout without an account. Use the returned basket ID to read the cart and place the order.

Instructions

Add a product to the anonymous (visitor-keyed) Alza web cart via the live m.alza.cz basket/v1 API, using the numeric commodity_id (e.g. 7229946) from search_products/get_product. Use for the web checkout flow (row W5) instead of the account cart — this basket is keyed to the visitor (Balancer-Guid), not to an Alza login. The response carries the basket id; pass it to web_cart to read the cart, and the place/payment ids flow into web_place_order. Side effect: creates or extends the visitor basket. No account token required. Example: web_add_to_cart({commodity_id: 7229946, count: 1}).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
countNoHow many units to add. Default 1, max 99.
commodity_idYesNumeric Alza commodity id (e.g. 7229946; the numeric id from `get_product`/`search_products`).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errNo
msgNo
dataNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.3.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=false, idempotentHint=false, destructiveHint=false, so the mutation profile is known. The description adds valuable behavioral context: it creates or extends the visitor basket (side effect), requires no account token, and is keyed to the visitor (Balancer-Guid) rather than a login. It also notes the response carries the basket id. This goes beyond the annotations without contradicting them.

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?

The description is dense but well-organized: it front-loads the core action and API, then explains the keying distinction, downstream flow, side effect, auth requirement, and an example. Every sentence earns its place. It is slightly long, but the density of useful routing information justifies the length.

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?

For a two-parameter mutation tool with a full output schema, the description is complete. It covers the API endpoint, the keying model, the auth requirement, the side effect, the downstream tools to use, and a concrete example. Nothing an agent needs to call it correctly is missing.

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 100%, so the schema already documents both parameters well. The description adds a concrete example (`commodity_id: 7229946, count: 1`) and clarifies the commodity_id source (`from search_products/get_product`), which is useful. However, the description doesn't add meaning beyond what the schema already provides for the parameters themselves; the baseline 3 is appropriate.

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 states a specific verb ('Add'), a specific resource ('anonymous visitor-keyed Alza web cart'), and the exact API endpoint (m.alza.cz basket/v1). It also distinguishes this from the account cart by naming the sibling `add_to_cart` implicitly through the visitor-keyed vs login-keyed contrast, and it explicitly references the web checkout flow (row W5). An agent can tell this apart from `add_to_cart` and `cart` without opening schemas.

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

Usage Guidelines5/5

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

The description explicitly says when to use this tool: 'Use for the web checkout flow (row W5) instead of the account cart'. It also names the alternative (`add_to_cart` is the account cart sibling) and explains the keying difference (visitor Balancer-Guid vs Alza login). It further explains the downstream flow: pass basket id to `web_cart`, and place/payment ids flow into `web_place_order`. This is explicit when/when-not guidance.

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