Skip to main content
Glama

lookup_food

Look up foods by name or barcode to retrieve per-100g macros, portions, and a food_id for later logging or editing.

Instructions

Search foods without logging: a name ("kimchi", "clif bar") or a product barcode. Returns candidates with per-100 g macros, portions and a food_id to pass to log_food or edit_food.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryNo
barcodeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

With no annotations provided, the description carries the full behavioral burden. It explicitly states the tool does not log, accepts name or barcode input, and returns candidates with macros, portions, and a food_id. This is substantive behavioral disclosure, though it doesn't cover edge cases like no results or ambiguous matches.

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 sentences front-load the core purpose, give concrete examples, and summarize the return value. Every element earns its place with no redundancy.

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?

For a simple lookup tool with no annotations and no output schema, the description covers input forms, return fields, and downstream usage. It could be slightly more explicit about requiring at least one parameter, but overall an agent has enough to call it correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0% description coverage, but the description compensates by mapping 'query' to a food name and 'barcode' to a product barcode, with examples. It clarifies that the two parameters are alternative search modes, adding meaning beyond the bare property names.

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?

The description states a specific verb and resource: 'Search foods without logging', and immediately distinguishes it from mutation tools by noting it returns a food_id to pass to log_food or edit_food. This clearly differentiates it from the sibling logging tools.

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 description provides clear context — use this to search foods before logging or editing, without creating a log entry. It implicitly tells the agent when to use it versus log_food/edit_food, though it doesn't explicitly name alternatives or exclusion cases.

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