Skip to main content
Glama
domdomegg

openfoodfacts-mcp

Get product

get_product
Read-only

Retrieve current product information from Open Food Facts by barcode. Directly reads the primary database for up-to-date nutrition, ingredients, and labels. Use when you have a barcode for accurate results.

Instructions

Get product information from Open Food Facts by barcode. Reads the primary database directly (no sync lag), so this is always current even when search_products returns stale results. Prefer this over search whenever you have a barcode. If this returns "product not found", the product genuinely isn't in the database — you can add it with add_or_edit_product.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
barcodeYesProduct barcode (EAN-13, UPC-A, etc.)
fieldsNoFields to return. Defaults to: product_name, brands, categories, nutriscore_grade, nova_group, ingredients_text, nutriments, serving_size, image_url, quantity, code
languageNoLanguage code for language-dependent fields (product_name, generic_name, ingredients_text). Defaults to "en". When a product has a different primary language, the unsuffixed field names return that language's data — this param ensures you get the language you want.en
Behavior5/5

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

Annotations declare readOnlyHint: true; the description adds that the tool reads the primary database directly, is always current, and explains the 'product not found' behavior. No contradictions; value added beyond annotations.

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?

Three sentences, each purposeful: one for purpose and freshness, one for usage preference, one for error handling. No wasted words, front-loaded with key 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?

Given no output schema, the description sufficiently covers input, behavior, and error handling. Combined with thorough annotations and schema, the agent has everything needed to use the tool correctly.

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 100%, but the description adds crucial context for the 'language' parameter, explaining its effect on unsuffixed fields. This goes beyond the schema's description and clarifies behavior.

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 clearly states the tool gets product information by barcode from Open Food Facts, and distinguishes itself from sibling search_products by emphasizing direct database access and no sync lag. The verb 'Get' and resource 'product information' are specific.

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

Usage Guidelines5/5

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

The description explicitly advises preferring this tool over search when a barcode is available, and provides guidance on what to do if the product is not found—add it with add_or_edit_product. This gives clear when-to-use and when-not-to-use instructions.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/domdomegg/openfoodfacts-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server