Skip to main content
Glama

Food Facts

Compare products

compare_products
Read-onlyIdempotent

Use this when the user wants to compare packaged foods, such as "which of these barcodes has the least sugar?". Pass one to five barcodes and optionally sugars (default), salt or kcal. Returns a ranking from lowest to highest per 100 g with each product's other nutrition, Nutri-Score and NOVA group, and lists barcodes that were invalid, not found or lacked data. Crowd-sourced data: check the physical labels.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fieldNoWhat to rank by, per 100 g: sugars (default), salt or kcal
barcodesYesBarcodes to compare, up to 5

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
unitYes
basisYes
fieldYes
orderYes
noticeYes
rankedYes
statusYes
invalidNo
messageNo
no_dataNo
not_foundNo
attributionYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.9/5.0
Behavior4/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), so the bar is lower. The description adds genuinely useful behavioral context beyond them: the ranking is lowest-to-highest per 100 g, invalid/not-found/no-data barcodes are reported back, and the 'Crowd-sourced data: check the physical labels' caveat warns about data reliability.

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?

Four tightly packed sentences with no filler; usage and the key constraint lead, and the data-quality warning closes. It is dense but each sentence carries distinct information, so it stays on the right side of conciseness.

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 an output schema present, the description need not detail return values, yet it summarizes the ranking, included nutrition fields, and error list. Combined with annotation-covered safety and full schema coverage, only the lack of explicit sibling routing keeps it from being fully complete.

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 parameters (field enum and barcodes array) are already fully documented in the schema. The description restates the sugars default and the 1-5 range without adding format or edge-case detail beyond the schema, so the baseline of 3 is appropriate.

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?

States a specific verb and resource ('compare packaged foods') and adds a concrete example ('which of these barcodes has the least sugar?') that pins the domain to packaged foods. It does not explicitly distinguish itself from siblings like lookup_barcode or search_products, so an agent must infer the multi-barcode comparison role rather than being told.

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?

The opening 'Use this when...' gives a clear trigger condition with an illustrative query, and the parameter sentence clarifies the 1-5 barcode constraint. It stops short of explicit when-not guidance or naming the alternative tools (e.g., single lookup vs. comparison), leaving that routing to inference.

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