Skip to main content
Glama
Nutriscan MCP connector

Nutriscan MCP connector

by si-essence

nutrients_per_serving

Read-only

Calculate energy and key nutrients for a single Open Food Facts product by barcode, scaling per-100 g values to a label serving, serving count, or gram amount.

Instructions

Energy and key nutrients for one Open Food Facts product, scaled from per-100 g data to one label serving, a number of servings, or a gram amount. Pass grams when the product has no serving size. Salt is in grams. If both grams and servings are set, grams wins.

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

Input Schema

NameRequiredDescriptionDefault
gramsNoAmount in grams. If set, servings is ignored.
barcodeYesBarcode printed on the package (EAN-8, UPC-A, or EAN-13). Digits only; spaces and dashes are ignored.
servingsNoNumber of label servings. Defaults to 1 when grams is omitted.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, non-destructive, open world), and the description adds genuinely useful behavior: the scaling basis, the grams-over-servings precedence, and the unit caveat 'Salt is in grams'. It omits what happens on an unknown barcode or missing per-100 g data, and gives no sense of which nutrients are returned.

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?

Four short sentences, front-loaded with what the tool computes and its units, then the selection rule. No filler and nothing buried.

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?

There is no output schema, so the description carries the burden of describing return values, yet it only says 'energy and key nutrients' without listing which nutrients or the response shape. Error/edge behavior (invalid barcode, product lacking serving size or nutrient data) is also left unstated, leaving modest gaps for a tool this simple.

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%, so both optional parameters are already documented, including 'If set, servings is ignored.' The description largely restates that precedence rule rather than adding new parameter meaning; the only marginal addition is the implicit default of one serving when grams is omitted.

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?

States a specific resource (energy and key nutrients for one Open Food Facts product) and the computation basis (per-100 g data scaled to a label serving, N servings, or a gram amount). This clearly separates it from sibling lookup tools like barcode_lookup or product_search, which return raw product data rather than scaled nutrients.

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?

Gives a concrete conditional: 'Pass grams when the product has no serving size,' plus a precedence rule ('If both grams and servings are set, grams wins'). It does not name an alternative tool for the case where the product is unknown or lacks nutrient data, so it stops short of explicit when-not guidance.

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