Skip to main content
Glama

openfoodfacts-mcp-server

Get Food Product by Barcode

off_get_product
Read-onlyIdempotent

Fetch a packaged food product by barcode (EAN-13 or UPC) from Open Food Facts. Returns the product name, brand, quantity, ingredients (raw text and parsed list), allergens, additives, computed scores (Nutri-Score a–e, NOVA 1–4, Green-Score), nutrition per 100g and per serving, categories, labels, packaging, origins, image URL, and data completeness. Open Food Facts is a crowd-sourced database — a missing field means "not yet entered by contributors," not that the attribute is absent from the actual product. Computed scores carry regional formula caveats and are indicators, not absolute rankings. Data is under ODbL 1.0 — cite Open Food Facts in downstream use.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldsNoSubset of fields to return. Omitting returns all standard fields. Use to reduce payload when only scores or ingredients are needed.
barcodeYesEAN-13 or UPC barcode (8–14 digits). The primary key for Open Food Facts. Example: "3017620422003" (Nutella FR).

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
barcodeNoBarcode as returned by the API.
productNoProduct data. Always present on a successful call — a barcode with no contributor record raises the not_found error instead of returning an empty result.
requested_fieldsNoThe field subset that was requested, when the caller passed `fields`. Absent means all standard fields were requested. Sections outside this subset are omitted because they were not requested — not because Open Food Facts lacks the data.

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, openWorldHint, and idempotentHint, but the description adds valuable behavioral context: it explains that missing fields mean data not yet entered by contributors (reinforcing open world), that computed scores are indicative with regional caveats, and that data is under ODbL 1.0 requiring attribution. This goes beyond the annotations by clarifying data interpretation and licensing, without contradicting any hint.

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 description is front-loaded with the core purpose and then lists the return fields and caveats. While it is somewhat lengthy, each sentence adds relevant context (data interpretation, score limitations, license). The structure is logical, but given an output schema exists, some field enumeration could be trimmed without loss, earning a 4 rather than a 5.

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?

The description equips an agent with everything needed to call the tool correctly: the primary key (barcode), optional field filtering, the full return set, and important data quality caveats (crowd-sourced, missing fields, score interpretation). It also covers licensing for downstream use. Combined with the existing annotations (read-only, idempotent, open-world), no critical context is missing.

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?

Both parameters (barcode and fields) are fully documented in the input schema with descriptions (100% coverage). The tool description adds no new parameter-specific guidance beyond the schema, so it doesn't enhance what the schema already provides. The baseline score of 3 is appropriate since the schema does the heavy lifting.

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 explicitly states the tool 'Fetch a packaged food product by barcode (EAN-13 or UPC) from Open Food Facts,' providing a specific verb and resource. It also enumerates the returned fields, making the tool's function unmistakable. Although it doesn't explicitly contrast with sibling tools, the barcode-based retrieval is distinct from search, compare, and browse, satisfying the distinction criterion.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description says nothing about when to use this tool versus its siblings (off_search_products, off_compare_products, off_browse_taxonomy). It does not mention that this is the appropriate choice when a specific barcode is known, nor does it advise against using it for broad searches. The only implicit guidance is that barcode identification is required, but explicit routing to alternatives is missing.

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.

TDQS

A4.4/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: taxonomy resolution, product search, product details, and comparative analysis. No overlap or ambiguity exists between them.

Naming Consistency5/5

All tools follow a consistent 'off_verb_noun' pattern with snake_case (browse_taxonomy, compare_products, get_product, search_products). The naming is predictable and immediately conveys the action and target.

Tool Count5/5

With only 4 tools, the server stays well-scoped and avoids redundancy. This is an ideal size for a focused read-only API covering search, fetch, compare, and taxonomy lookup.

Completeness5/5

For a read-only crowd-sourced database, the toolset covers all essential workflows: discovering products (search), retrieving full details (get), comparing alternatives (compare), and resolving filter values (browse_taxonomy). No critical gaps are apparent.