Skip to main content
Glama

Look up products by barcode

lookup_barcode
Read-onlyIdempotent

Find the products carrying one or more barcodes (GTIN, EAN or UPC) at Aldi, Tesco, SuperValu, Dunnes Stores and Lidl in one call.

Codes are accepted exactly as printed: leading zeros, spaces and hyphens
are ignored. Needs a signed-in BasketWatch account.

Args:
    codes: one barcode, or up to 100 separated by commas
        (e.g. "5000127014084" or "5000127014084,5000157024671").
    store: optionally restrict to one of "aldi", "tesco", "supervalu",
        "dunnes" or "lidl".
    include_copy: also return ingredients and per-100g nutrition where
        the retailer publishes them.

Returns {"products": [...], "not_found": [...], "invalid": [...]}. Each
product row carries store, matched_barcodes, name, brand, pack_size,
price and its full barcodes list. One credit per barcode found, however
many retailers stock it; codes with no match cost nothing.

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": {
      "codes": "<codes>"
    },
    "name": "lookup_barcode"
  }
}

Input Schema

NameRequiredDescriptionDefault
codesYes
storeNo
include_copyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • removedInput schema / properties / lidl_store_id
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "string"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "title": "Lidl Store Id"
      -}
  2. Changed1 schema field changed
    • addedInput schema / properties / lidl_store_id
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "title": "Lidl Store Id"
      +}
  3. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already cover read-only, idempotent and open-world traits, and the description adds genuinely new behavior: an auth requirement, a per-barcode credit cost model where unmatched codes are free, and the not_found/invalid partitioning of results. These are cost and failure semantics an agent cannot get from the annotations or schema.

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?

Front-loaded with purpose and retailer scope, then formatting rules, then the return shape — a logical progression with no filler. It is somewhat sprawling across many short lines and repeats the store list implicitly through the parameter docs, but every section contributes.

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 specifies the return envelope (products/not_found/invalid) and the per-row fields, plus the credit implications of each outcome. For a 3-parameter read tool with no output schema, nothing an agent needs to call or interpret it is missing.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description carries the full burden and does: it defines the codes format with examples and a 100-item limit, enumerates the five valid store values as an effective enum, and explains include_copy's effect on returned fields. Each parameter is given meaning beyond its bare name.

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?

States a specific verb and resource (find products carrying barcodes) plus the exact scope: five named retailers in one call. This is clearly distinguishable from keyword-oriented siblings like search_products or find_products because the input modality (barcode/GTIN) is stated up front.

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 concrete use conditions: barcodes accepted as printed (leading zeros/spaces/hyphens ignored), up to 100 comma-separated codes, optional single-store restriction, and a signed-in account requirement. It never explicitly names an alternative tool or when not to use this one, so it falls short of a 5.

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.

Resources