Skip to main content
Glama

Compare Indian foods on a nutrient

compare_foods
Read-onlyIdempotent

Compare 2-8 Indian foods side by side on a single nutrient (calcium, fibre, iron, protein), returning each food's headline value per 100 g, its other rows, and a source URL. Use this to answer 'which has more protein/iron/fibre'; use lookup_food for one food in depth. Read-only. Foods it cannot match are listed in not_found and the rest are still compared; an unsupported nutrient returns an error naming the valid ones.

Input Schema

NameRequiredDescriptionDefault
foodsYes2 to 8 food names, e.g. ['rajma', 'chana', 'moong dal']. Unknown names are returned in not_found.
nutrientNoThe nutrient to compare on. Defaults to protein.protein

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed5 schema fields changed
    • changedInput schema / properties / foods / description
      Previous value: -"2-8 food names"New value: +"2 to 8 food names, e.g. ['rajma', 'chana', 'moong dal']. Unknown names are returned in not_found."
    • addedInput schema / properties / foods / maxItems
      Added value: +8
    • addedInput schema / properties / foods / minItems
      Added value: +2
    • addedInput schema / properties / nutrient / default
      Added value: +"protein"
    • changedInput schema / properties / nutrient / description
      Previous value: -"Default protein"New value: +"The nutrient to compare on. Defaults to protein."
  2. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already cover read-only, idempotent, closed-world, non-destructive, so "Read-only" earns no credit. What does add value is the partial-failure contract: unmatched names land in not_found while the remaining foods are still compared, and an unsupported nutrient fails with an error naming valid ones. That is real behavior an agent must plan around; only the response shape (per-100 g headline plus "other rows") stays loosely specified.

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?

Three dense sentences, correctly front-loaded with the core action followed by routing, safety, and error semantics. Minor waste: "Read-only" repeats annotations and the parenthetical nutrient list repeats the enum, though the parenthetical does aid scanning.

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?

There is no output schema, so the description carries the burden of describing returns and does so (headline value per 100 g, other rows, source URL). Combined with the partial-match and invalid-nutrient behavior, an agent has everything needed to call this correctly and interpret the result.

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 the description largely restates it: the nutrient list duplicates the enum, the 2-8 bound duplicates minItems/maxItems, and the not_found behavior for unknown names is already in the foods parameter description. Baseline 3 is correct because the schema, not the prose, carries parameter meaning.

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 and resource ("Compare 2-8 Indian foods side by side on a single nutrient") with tight scope: 2-8 items, one nutrient, per-100 g basis. It also names the sibling it is not ("use lookup_food for one food in depth"), so an agent can choose between them without opening either schema.

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?

Gives an explicit trigger ("which has more protein/iron/fibre") and an explicit alternative with its own condition (lookup_food for single-food depth). The when-not case is covered by naming the sibling rather than leaving it to inference.

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.