Skip to main content
Glama

Find the cheapest store for a shopping list

compare_basket
Read-only

Totals a shopping list by supermarket near a location and ranks stores by basket cost, plus the lowest combined price when buying each item at its cheapest store.

Instructions

Totals a shopping list (barcodes and quantities) in each nearby supermarket and ranks them. Also returns the total if each item is bought where it is cheapest.

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": {
      "items": "<items>",
      "lat": "<lat>",
      "lng": "<lng>"
    },
    "name": "compare_basket"
  }
}

Input Schema

NameRequiredDescriptionDefault
latYesLatitude (Argentina is between -21 and -56)
lngYesLongitude (Argentina is between -53 and -74)
topNoHow many stores to return per list
itemsYesProducts to buy
radius_kmNoSearch radius in km (default 10, max 50)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.8/5.0
Behavior4/5

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

Annotations only declare readOnly and openWorld, so the description carries the burden of explaining output, and it does: results are per-store totals plus a ranking, and additionally a split-basket total. It omits notable behavior such as what happens when a barcode is missing from a store, which currency/pricing source is used, and the fact that it is restricted to a single country.

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?

Two sentences, both load-bearing: the first states the core operation and ranking, the second states the secondary output. The primary capability is front-loaded and there is no filler.

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?

With five parameters, three required, and no output schema, the description is largely sufficient: it explains both return values and the comparison semantics. Gaps remain around data coverage (Argentina-only coordinates imply a hard geographic limit) and partial-match behavior, which matter for a comparison tool.

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?

With 100% schema description coverage, the schema already explains lat/lng bounds, item barcodes and quantities, top, and radius_km. The description only restates that items are barcodes and quantities and that stores are 'nearby', adding no syntax or constraint detail beyond the schema.

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?

The description names a concrete verb and resource: it totals a shopping list across nearby supermarkets and ranks the results, plus a second best-price-per-item total. That is clearly distinct from a plain store finder or product-price lookup, though it never names a sibling to route against.

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?

Usage is only implied: an agent can infer you call this when you have a full basket and want store rankings. There is no explicit statement of when to prefer it over find_stores or get_product_prices for single-item or discovery queries, and no exclusions or prerequisites.

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