Skip to main content
Glama
adrian-baker

woolies-mcp

by adrian-baker

Set a trolley line's quantity

set_cart_quantity
Idempotent

Set a product's exact quantity in the Woolworths trolley, adding or removing the line. Handles weight-based items and returns the actual applied quantity when the site adjusts it.

Instructions

Set one product's trolley line to an exact quantity, adding it if absent. Quantity is absolute, not a delta: the value you pass becomes the line's new quantity, and 0 removes the line. For pricingUnit, use the product's purchasingUnit field from search_products or get_product verbatim — it is 'Each' or 'Kg'. Only pass 'Kg' with a decimal quantity when the product's canBuyByWeight is true; sending 'Kg' for a counted item orders a kilogram of it. Returns requestedQuantity and appliedQuantity separately, because Woolworths silently substitutes its own quantity for some products (0.3 Kg of loose bananas becomes 0.5 Kg). When adjusted is true, adjustment says what the site did instead — report the applied amount to the shopper, never the requested one. Also returns trolleyTotalQuantity (quantities summed across the whole trolley, not a line count). To change several products, use set_cart_quantities instead. Needs a signed-in session; run npm run login where the server runs, or call sign_in for the details.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
skuYesWoolworths product SKU, from search_products.
quantityYesThe line's new absolute quantity. 0 removes it. Decimals only for Kg.
pricingUnitNo'Each' for counted items, 'Kg' for items priced by weight.Each
Install Server

TDQS

A4.9/5.0
Behavior5/5

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

Beyond the annotations (idempotentHint=true, destructiveHint=false), the description discloses subtle behavior: quantity is absolute not a delta, 0 removes the line, Woolworths may silently substitute quantity and report it via adjusted/adjustment, and trolleyTotalQuantity is a sum across the whole trolley. This is rich behavioral context that genuinely helps an agent anticipate non-obvious outcomes.

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?

The description is long but every sentence carries substantive information: core behavior, parameter rules, return-value nuance, alternative tool, and auth requirement. It fronts the main behavior and then layers detail logically, with no filler or repetition.

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?

Despite having no output schema, the description explains the important return fields (requestedQuantity, appliedQuantity, adjusted, adjustment, trolleyTotalQuantity) and what they mean. It covers auth, the source of pricingUnit, a caveat about weight purchases, and the sibling tool for multiple updates, making the tool fully usable by an agent.

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?

The schema already covers the parameters at 100%, which sets a baseline of 3. The description adds valuable semantics beyond the schema: sourcing pricingUnit from the product's purchasingUnit field, requiring canBuyByWeight for decimal 'Kg' quantities, and warning that 'Kg' for a counted item orders a kilogram. This clearly exceeds the baseline.

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 opens with the specific action 'Set one product's trolley line to an exact quantity, adding it if absent,' clearly indicating the verb and resource. It also differentiates itself from the sibling set_cart_quantities by noting it handles one line rather than several.

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?

It explicitly says 'To change several products, use set_cart_quantities instead,' giving a direct alternative and selection criterion. It also states the auth prerequisite — 'Needs a signed-in session; run npm run login...' — and provides detailed usage rules for pricingUnit and canBuyByWeight.

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

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/adrian-baker/woolies-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server