Skip to main content
Glama

Crypto, web, finance and app data tools

Food Product by Barcode

food_product

Food product details from its EAN/UPC barcode: name, brand, quantity, ingredients, allergens, Nutri-Score, NOVA processing group, Eco-Score and nutrients per 100 g, from Open Food Facts. Use for nutrition apps, shopping assistants or allergy checks.

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

Input Schema

NameRequiredDescriptionDefault
barcodeYes

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A3.8/5.0
Behavior3/5

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

With no annotations, the description must carry the full behavioral burden. It usefully discloses the data source and that nutrient values are normalized per 100 g, but says nothing about behavior for unknown barcodes (empty result vs. error), the coverage limits of Open Food Facts, or latency/rate characteristics. The read-only nature is only implied by "details from".

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 purpose clause followed by a compact field list, then one short usage sentence. No filler or repetition, though the trailing usage clause is the least load-bearing part of the text.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

An output schema exists, so return-value explanation is rightly omitted, and a one-parameter lookup is simple. Still missing for correct invocation: barcode format expectations and the not-found case, both of which an agent would need to handle results correctly.

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 description coverage is 0% and the single `barcode` property is undocumented, so the description has to compensate. It adds key meaning by specifying EAN/UPC, but leaves format details open — digit-only vs. hyphenated, accepted lengths (EAN-8/UPC-A/EAN-13), and whether leading zeros are required.

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?

Names a specific resource (food product) retrieved by a specific key (EAN/UPC barcode) and enumerates exactly what comes back: name, brand, quantity, ingredients, allergens, Nutri-Score, NOVA group, Eco-Score, nutrients per 100 g. It also names the upstream source (Open Food Facts), and no sibling tool covers nutrition, so an agent can route here unambiguously.

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?

"Use for nutrition apps, shopping assistants or allergy checks" gives concrete usage contexts, which is enough to tell an agent this is a lookup-by-barcode tool rather than a search tool. It stops short of explicit exclusions or alternatives (e.g., what to do when the barcode is unknown or when only a product name is available).

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.

Resources