Skip to main content
Glama

Look up a product by barcode

data_barcode_lookup
Read-onlyIdempotent

Look up a consumer product by its barcode (EAN-8, UPC-A, EAN-13 or GTIN-14), or search by name or brand, in Open Beauty Facts (cosmetics), Open Pet Food Facts and Open Products Facts (household and other non-food goods): name, brand, category, quantity, front image, ingredients and countries, from each database's nightly export (ODbL 1.0, images CC BY-SA 3.0). Food products (Open Food Facts) and prices are not covered: price is always null. An unknown barcode answers an empty list. Costs 1 credit. Every row has name (platform/collection/id), kind, its fields and source {platform, url, license, attribution, fetched_at, terms_url}; quote source.attribution when you show a row.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "data_barcode_lookup"
  }
}

Input Schema

NameRequiredDescriptionDefault
qNoName, brand or category words when there is no barcode, such as nivea sun.
barcodeNoThe barcode digits, such as 3600523614462.
databaseNoOnly this database.
page_sizeNoRows per page, 1 to 50 (default 10).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnly/openWorld/idempotent/non-destructive, so the description is not burdened with safety disclosure; instead it adds real operational facts beyond them: 1 credit per call, empty list for unknown barcodes, price always null, nightly-export staleness, licensing/attribution obligations. It stops short of describing pagination behavior beyond the page_size cap or what happens if both q and barcode are supplied.

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 formats, then scope exclusions, cost, and output shape — little waste. The license/attribution parenthetical is dense and slightly packed into a single run-on chain, but each clause carries actionable information.

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 carries the return contract on its own and does so: named fields per row, the source object's members, and the attribution-quoting duty. Cost, empty-result behavior, and data freshness round out what an agent needs before calling.

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%, so the baseline is 3; the description earns slightly more by explaining the q-vs-barcode dichotomy (q is the fallback when no barcode exists) and by framing the database enum as the covered collections. It does not clarify precedence if both q and barcode are passed.

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 (look up / search) and resource (consumer product by barcode), enumerates supported barcode formats, and names the three covered databases plus the excluded one (Open Food Facts). An agent can tell exactly what comes back: name, brand, category, quantity, image, ingredients, countries.

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 routing between the two modes: barcode when you have digits, name/brand/category words otherwise (echoed in the q param). Explicitly excludes food products and prices, which functions as a when-not-to-use signal, but it never names an alternative tool or data source for the excluded cases.

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.