Skip to main content
Glama

Barcode lookup

lookup_barcode
Read-only

Look up a UPC or EAN barcode and return macros per 100 g. Use when the user provides a barcode number.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
upcYesUPC or EAN digits, no spaces

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior3/5

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

Annotations already declare readOnlyHint=true and destructiveHint=false, and the description is consistent with a safe read. It adds the per-100 g normalization of results, but says nothing about miss behavior (barcode not found) or external lookup/rate considerations, so value beyond the structured fields is modest.

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?

Two tight sentences, zero filler: the action and return unit come first, the usage trigger second. Nothing could be removed without losing information.

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 describe return values, and it correctly covers input type and usage trigger for a 1-parameter tool. The only gap is unstated failure behavior when a barcode resolves to no product.

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%, so the "UPC or EAN digits, no spaces" constraint is already fully documented in the schema. The description's mention of "UPC or EAN" reinforces rather than extends that, so the baseline 3 applies.

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 (look up), a precise resource (UPC or EAN barcode), and even the return shape (macros per 100 g). This clearly separates it from name-based siblings like search_foods or get_food_nutrition, though it never names an alternative directly.

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 when the user provides a barcode number" gives a concrete triggering condition, which is strong for a single-input tool. It stops short of explicit exclusions (e.g., what to do when the user gives a food name instead), so it is clear context without routing against alternatives.

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