Skip to main content
Glama

Cheapest Grocery Basket

Cheapest way to buy a whole list, including splitting stores

cheapest_basket

The complete buying decision for a shopping list: the cheapest single store that can fill it, AND the cross-store optimum that buys each line wherever it is cheapest, with the dollar savings between them and how many stops that costs. Every line carries substitutes at the other stores with the exact extra cost of choosing them, so a shopper can collapse a two-stop trip into one and see precisely what that convenience costs. Out-of-stock items are skipped in favour of an in-stock option even when it is dearer. Use this as the default for "where should I buy this list today" — it is the one call that answers the whole question. Costs $0.02 USDC per call via x402 on Base.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
zipYes5-digit US ZIP code, e.g. '30501'.
modeNoOptional fulfillment intent: 'pickup' or 'delivery'.
itemsYesComma-separated shopping list, optionally with quantities, e.g. 'milk x2, eggs, bread, butter, cheese'. A JSON array of {name, quantity} is also accepted.
storesNoOptional comma-separated chains the shopper is willing to visit, e.g. 'aldi,publix'.
maxAgeDaysNoOptional freshness limit in days (default 14, max 120). A price read longer ago than this is withheld rather than returned as if current; raise it to accept older readings.

TDQS

A4.1/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It discloses the core computation logic (single-store vs cross-store optimum), output dimensions (savings, number of stops), substitution handling, out-of-stock policy, and even pricing ('Costs $0.02 USDC per call'). It does not mention auth or failure modes, but the disclosed behaviors are substantive and specific.

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 several sentences long but every sentence adds value: core result, substitution detail, out-of-stock behavior, usage guidance, and cost. The main purpose is front-loaded, though the first sentence is dense and could be split for easier scanning.

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?

Given there is no output schema, the description does a good job outlining what the caller can expect: cheapest single store, cross-store optimum, savings, stop count, and per-line substitutes with extra costs. It does not specify exact output field names or edge cases like an empty list, but the described behavior is sufficient for an agent to invoke the tool with reasonable confidence.

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 baseline is 3; the schema already documents all five parameters, including examples and default behavior for maxAgeDays. The description adds contextual value by explaining what the overall output should contain, but it does not add meaningful per-parameter semantics beyond the schema.

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 ('buy') and resource ('a shopping list'), and clearly distinguishes two outputs: the cheapest single store and the cross-store optimum. It differentiates itself from siblings like price_basket by explicitly claiming to answer the whole 'where should I buy this list today' question in one call.

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?

The description gives clear usage context: 'Use this as the default for "where should I buy this list today" — it is the one call that answers the whole question.' It does not explicitly name alternatives or when-not-to-use, but the default framing and phrase 'the one call' provides actionable selection guidance relative to sibling tools.

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.1/5.0
Disambiguation4/5

find_product, demand_report, and request_data are clearly distinct, but price_basket and cheapest_basket both operate on a whole shopping list. Their descriptions define different output styles (itemized per-store baskets vs. optimized buying decision), so an agent can usually choose correctly, though some overlap remains.

Naming Consistency4/5

All names are lowercase snake_case and descriptive, but find_product, price_basket, and request_data follow a verb_noun form while cheapest_basket and demand_report are noun phrases. This is a minor inconsistency rather than a chaotic naming scheme.

Tool Count4/5

The four listed tools are well-scoped for grocery price/basket queries plus data demand. However, the header declares five tools while only four are described, so the exact intended surface is slightly uncertain.

Completeness4/5

Core grocery use cases are covered: single-item lookup, one-trip basket pricing, multi-store optimization, and data demand. A minor gap is the lack of dedicated tooling for broader store or product meta-information beyond the price and stock fields already returned.

Resources