Skip to main content
Glama

openfoodfacts_product

Retrieve detailed food product information from a barcode via Open Food Facts, including Nutri-Score, ingredients, allergens, and nutrition facts per 100g.

Instructions

Food product sheet from a barcode (EAN/UPC/GTIN) via Open Food Facts: name, brand, quantity, Nutri-Score, NOVA, Eco-Score, nutriments per 100 g, ingredients, allergens, traces, labels, categories, countries, packaging, image. Costs 0.002 USDC on Base per successful call (x402). Without a payment key this tool returns the 402 challenge.

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": {
      "barcode": "<barcode>"
    },
    "name": "openfoodfacts_product"
  }
}

Input Schema

NameRequiredDescriptionDefault
barcodeYes8-14 digit barcode

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.3.0

TDQS

A4.3/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 disclosure burden and does well: it states the per-call price (0.002 USDC on Base), the x402 payment protocol, and the exact failure mode without a key (402). It leaves out what happens on an unknown or malformed barcode (404 vs empty result) and any caching or rate-limit behavior.

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 payload description is front-loaded in a single dense sentence, followed by a compact pricing/authentication sentence. The long comma-separated field list is justified because there is no output schema, though it borders on inventory-dumping.

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 one-parameter tool with no output schema and no annotations, the description supplies what an agent needs: the input key, the returned data, the cost, and the auth requirement. The remaining gap is error semantics for invalid or not-found barcodes, plus nutrient-unit conventions, which the description only partially implies ('per 100 g').

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% and the schema already says '8-14 digit barcode', so the baseline is 3. The description adds value by naming the accepted symbologies (EAN/UPC/GTIN), which tells an agent that a 12-digit UPC and a 13-digit EAN are both valid inputs.

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 names a specific resource (a food product sheet) and the exact key that retrieves it (an EAN/UPC/GTIN barcode), then enumerates the returned fields (Nutri-Score, NOVA, Eco-Score, nutriments, allergens, packaging). That level of detail makes it unmistakable against siblings like gtin_validate or crossref_doi.

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?

It gives clear operational context for use: the tool requires a payment key and returns a 402 challenge without one, so an agent knows it cannot be called anonymously. It does not, however, point to any alternative or state when not to use it (e.g. for checksum-only validation, where gtin_validate would suffice).

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