Skip to main content
Glama

Match a shopping list to products

match_shopping_list
Read-only

Search every item on a shopping list in one call and return product candidates per line for building a basket; compare unit price, promotions, and stock before choosing.

Instructions

Search for every line of a shopping list in one call and return the top candidates per line. Use this first when building a basket, then pick one candidate per line (compare unit_price, promotions and stock).

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>"
    },
    "name": "match_shopping_list"
  }
}

Input Schema

NameRequiredDescriptionDefault
sortNoResult order; defaults to relevance. Price sorting uses pack price, not unit price.
itemsYesShopping-list lines; each may carry its own filters.
in_stock_atNoOnly products in stock at this store (or at any store). Omit to include out-of-stock products; each product reports `in_stock` either way.
candidates_per_itemNoCandidates to return per line (default 3).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4/5.0
Behavior4/5

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

Annotations already cover safety (readOnlyHint) and scope (openWorldHint), so the description only needs to add workflow behavior. It does: it discloses the fan-out of one call into per-line candidate sets and points to the result attributes an agent must compare (unit_price, promotions, stock). It does not describe the candidate object shape or failure behavior for unmatched lines, which would be the remaining value-add.

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, front-loaded with what the tool does and followed by the workflow instruction. No filler, no restating of the title or schema.

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?

For a four-parameter batch-search tool with full schema coverage and no output schema, the description covers purpose, workflow position, and the fields to compare across candidates. The gap is the return structure itself — 'top candidates' is not defined, and with no output schema the agent must discover candidate fields empirically.

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 every parameter (sort, items sub-fields, in_stock_at, candidates_per_item) is already documented in the schema. The description adds only an indirect hint to compare unit_price, which is really output guidance rather than parameter meaning. Baseline 3 is appropriate.

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?

States a specific verb and resource with the key differentiator: 'Search for every line of a shopping list in one call and return the top candidates per line.' The batch-per-line behavior distinguishes it from a plain single-query product search, though it never names search_products or get_products as the single-item alternative.

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?

Gives clear workflow placement: 'Use this first when building a basket, then pick one candidate per line.' That tells the agent when this tool belongs in a multi-step flow. It stops short of an explicit exclusion (e.g. 'do not use for a single product lookup'), so it is strong context rather than full 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.