Skip to main content
Glama

Plate Pal

Nutrition for a packaged product by barcode, with UK traffic lights

get_barcode_nutrition
Read-onlyIdempotent

Nutrition for a packaged product by barcode, with UK traffic lights. Use for "is this barcode high in sugar?", "how many calories in this?" after a scan, or "what's the salt in 5000157024886?". Returns per 100 g (or 100 ml) and per serving values, traffic lights for fat, saturates, sugars and salt, Nutri-Score, allergens and a Halal or Not? link for checking the ingredients

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesBarcode digits (8 to 14).
servingsNoNumber of servings to total up (0.25 to 20).

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already declare it read-only, idempotent, non-destructive and closed-world, so the safety profile is covered. The description adds genuinely useful behavioral detail: output granularity (per 100 g / 100 ml and per serving), the specific traffic-light nutrients, Nutri-Score, allergens and a Halal link. It omits failure behavior for unknown barcodes.

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?

Two front-loaded sentences: purpose first, usage examples second, with the return contents appended. Efficient, though the trailing enumeration of return fields is somewhat dense and could be trimmed.

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 carries the return-value burden and enumerates the payload (per-100 g/serving values, traffic lights, Nutri-Score, allergens, Halal link). What's missing is edge-case behavior such as unknown barcodes or products without UK traffic-light data.

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 100% and both parameters (code, servings with its 0.25–20 range) are fully documented in the schema. The description adds no syntax or format meaning beyond that, so baseline 3 applies.

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 verb+resource (nutrition lookup for a packaged product by barcode) and the scope of the lookup is unambiguous. The barcode-keyed framing implicitly distinguishes it from the sibling get_food_nutrition, so an agent can route to it without opening schemas.

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 concrete invocation triggers ('is this barcode high in sugar?', 'how many calories in this?', 'what's the salt in 5000157024886?'), which is strong context. It stops short of naming when NOT to use it or pointing at get_food_nutrition as the alternative for non-barcode queries.

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.