Skip to main content
Glama

nutrition_compare

Compare two to five foods side by side to determine which is healthier or has more protein. Returns full nutrition data with per-nutrient winners.

Instructions

Compare 2 to 5 foods side by side. Use this when the user asks "which is healthier," "which has more protein," or any cross-food comparison — it's cheaper and clearer than calling nutrition_detail multiple times. Returns each food's full nutrition plus per-nutrient winners (highest protein, lowest sodium, etc.). Charges $0.003 USDC per call.

Args: fdc_ids: 2 to 5 USDA FDC IDs to compare.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
fdc_idsYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

No annotations are provided, so the description carries the full burden. It discloses pricing ($0.003 USDC per call) and return format (full nutrition plus per-nutrient winners). However, it does not mention error handling or edge cases.

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?

The description is concise with three sentences plus a parameter line. It front-loads the purpose, then gives usage guidance, then return and pricing. No wasteful content.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (likely detailed), the description adequately covers inputs, purpose, return summary, and pricing. It is complete for selecting and invoking the tool correctly.

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

Parameters5/5

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

The schema has 0% description coverage, so the description must compensate. It does so by explaining that fdc_ids are USDA FDC IDs and must be between 2 and 5, adding critical meaning beyond the schema.

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 clearly states the verb 'compare' with resource 'foods' and constraints '2 to 5'. It distinguishes from siblings by noting it's cheaper and clearer than calling nutrition_detail multiple times.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines5/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description explicitly states when to use ('when the user asks which is healthier, which has more protein, or any cross-food comparison') and why it's better (cheaper and clearer than alternatives). It also names the alternative tool nutrition_detail.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Younghef/nutriref-api'

If you have feedback or need assistance with the MCP directory API, please join our Discord server