Skip to main content
Glama

Compare foods side by side

compare_foods
Read-only

Compare 2–10 TACO foods side by side on selected nutrients per 100 g, keeping missing and trace values explicit so nulls are not ranked as lower.

Instructions

Compare 2 to 10 TACO foods (ids from search_food) on chosen nutrients, per 100 g of edible portion. Missing data stays null or {"trace":true}; do not rank a food with null as having less.

Input Schema

NameRequiredDescriptionDefault
food_idsYesTACO food numbers to compare, as returned by search_food.
nutrientsNoNutrient keys to compare. Omit for energy, protein, fat, carbohydrate, fiber and sodium.

Output Schema

NameRequiredDescriptionDefault
basisYesQuantity all values refer to.
foodsYesThe foods compared, in the order received.
notesYesCaveats about this answer.
sourceYesCitation for the data.
nutrientsYesOne row per requested nutrient, in table order.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true, so the safety profile is covered. The description adds real behavioral value beyond that: the per-100 g comparison basis and the explicit caveat that missing data surfaces as null or {"trace":true} and must not be ranked as lower — a data-interpretation rule an agent would otherwise get wrong.

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 compact sentences with the scope, basis, and the null-handling caveat front-loaded. Every clause carries information; nothing is redundant filler.

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 needn't explain return structure, and it covers the essential inputs, basis, and null semantics. Minor gaps remain: it doesn't say how invalid or out-of-range food ids are handled, nor whether results come back ordered or paginated.

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 both parameters are already documented, including the default nutrient set and the min/max bounds. The description largely restates the 2–10 range and adds only the per-100 g comparison basis, so the baseline of 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 (compare), resource (TACO foods), arity (2 to 10), selection dimension (chosen nutrients) and normalization basis (per 100 g edible portion). This clearly separates it from siblings like get_nutrients (single food detail) and calc_meal (aggregation), and it points to search_food as the id source.

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 establishes the entry condition (ids from search_food) and implies when the nutrients parameter can be left out via the schema default. It does not explicitly say when to prefer this over get_nutrients or calc_meal, so routing against every sibling is left partly to inference.

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