Skip to main content
Glama

Open Food Facts Nutrition Barcodes MCP

Get product nutrition facts by barcode

get_nutrition_facts
Read-onlyIdempotent

Retrieve per-100g and per-serving nutrition facts (kcal, fat, saturated fat, carbohydrates, sugars, fiber, protein, salt, sodium) for a product barcode.

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": "get_nutrition_facts"
  }
}

Input Schema

NameRequiredDescriptionDefault
barcodeYesProduct barcode (e.g. "3017620422003").

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.5/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, destructiveHint=false and openWorldHint, so safety and repeatability are covered. The description adds genuinely useful return-shape context (both per-100g and per-serving bases, plus the nutrient list), but says nothing about what happens for an unknown barcode -- a notable gap given openWorldHint implies external lookup.

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?

A single sentence with no filler, and the most decision-relevant information (per-100g and per-serving, field list) is front-loaded. It is efficient, though it could be split to surface the barcode requirement more prominently.

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?

With no output schema, the description correctly takes on the burden of describing return values by naming the nutrient fields and both measurement bases. What remains missing is failure behavior for unknown barcodes, which matters for an open-world lookup tool.

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?

Schema coverage is 100% and the barcode parameter is fully described with type, length bounds and an example, so the structured data carries the load. The description only restates that the input is a product barcode and adds no format, symbology, or normalization guidance beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description uses a specific verb ('Retrieve') and a precisely scoped resource ('per-100g and per-serving nutrition facts'), and enumerates the nutrient fields returned, which clearly differentiates it from the broader get_product_by_barcode. It stops short of naming any sibling as an alternative, so an agent must infer the split from the resource wording alone.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: the phrase 'for a product barcode' signals you need a barcode in hand, but there is no explicit when-to-use guidance, no statement of when to prefer get_product_by_barcode or get_ecoscore_nutriscore instead, and no prerequisites.

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.