Skip to main content
Glama

build_basket

MANDATORY for shopping lists. When the user gives you 2 or more grocery items, call this tool ONCE with the full list. Do NOT call decompose_product, search_products, or batch_search per item: this tool searches every item in parallel with built-in query analysis (category routing, brand aliases, subcategory boost) and returns a basket with per-item cheapest pick, per-retailer options, basket total, retailer totals, and a shareable share_url. If the user named the stores they shop at, pass them in 'retailers'; otherwise omit it to search all four.

VALIDATION (mandatory before rendering): The search engine uses keyword matching, so wrong products leak through. Items flagged with a 'review' field on their cheapest pick are LIKELY WRONG and need your attention first. Then scan ALL picks (flagged or not) and check: (1) Is the product actually what was asked for? (e.g. 'frozen chips' is NOT 'frozen blueberries', 'sweet potato' is NOT 'potato', 'chicken fingers crumbed' is NOT 'chicken breast') (2) Is the size/form correct? (e.g. 400g pack is not a valid match for '2kg') (3) Is the selected option the cheapest CORRECT product, not just the cheapest product? If a pick is wrong: pick the correct product from by_retailer options for that item, or mark as '(check in store)'. Recalculate basket_total from your corrected picks.

OUTPUT FORMAT: Line 1: 'Cheapest basket: $X.XX' (use corrected basket_total). Then ONE markdown table with columns: Item | Product | Store | Price | Size. Then one line: 'View and share this basket: '. Use '(check in store)' in the Product cell for items in items_missing or where no correct product exists. No preamble, no per-item narration, no follow-up offers.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
itemsYesShopping list items exactly as the user wrote them, e.g. ['4 bananas', 'whole chicken', '12 free range eggs', 'full cream milk 2L', 'spaghetti', 'sliced white bread']. Include any size/quantity in the string ('2L', '1kg', '12 pack') so the cheapest CORRECT size is chosen.
retailersNoOnly return results from these stores. Omit to search all four.

TDQS

A4.8/5.0
Behavior5/5

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

With no annotations, the description carries full burden. It discloses parallel search, built-in query analysis, keyword-matching limitation, the 'review' field warning, and detailed validation steps to catch wrong products. This goes well beyond what the schema provides.

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 long but well-organized into mandatory usage, validation, and output format sections. Every sentence serves a purpose, though it could be trimmed slightly without losing critical information. It is comprehensive and front-loaded with the 'MANDATORY' call-out.

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?

No output schema exists, so the description thoroughly explains return values (per-item cheapest pick, retailer options, totals, share_url) and dictates the exact output format including validation and handling of missing items. This gives the agent all necessary context for correct invocation and response.

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% and both parameters already have rich descriptions. The tool description adds extra context for 'retailers' (pass only if user named stores), but most parameter semantics are already present in the schema. The added guidance is helpful yet not essential, so above 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?

Description clearly states it builds a shopping basket by searching all items in parallel and returning cheapest picks, totals, and share URL. It explicitly distinguishes from siblings by instructing 'Do NOT call decompose_product, search_products, or batch_search per item'.

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 tool is marked 'MANDATORY for shopping lists' and explicitly says when to use it (2+ grocery items) and when not to use alternatives. It also explains when to pass 'retailers' versus omit it, providing clear decision context.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

TDQS

A4.3/5.0
Disambiguation3/5

batch_search, search_products, and get_cheapest all provide product search with overlapping output, and build_basket/save_basket both handle basket creation. However, detailed usage notes (mandatory vs. advanced) help clarify, though an agent could still misselect among the search tools.

Naming Consistency5/5

All tools follow a consistent verb_noun pattern in lowercase_snake_case (e.g., batch_search, compare_prices, get_product), making the API predictable and easy to learn.

Tool Count5/5

10 tools is well within the ideal 3-15 range and appropriately scoped for a grocery price-comparison and basket-building service, covering search, comparison, history, specials, and basket workflows without redundancy.

Completeness5/5

The tool set covers the full grocery shopping lifecycle: searching products, comparing prices by barcode, viewing price history, checking specials, building baskets, and saving manually curated selections. No obvious gaps for typical user requests.

Resources