Skip to main content
Glama

Compare foods

compare_foods
Read-onlyIdempotent

Puts several foods side by side at the same serving weight.

highest_per_nutrient names the food with the most of each nutrient. failed lists ids that could not be loaded, and partial is true when the comparison is missing some of them.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "fdc_ids": "<fdc_ids>"
    },
    "name": "compare_foods"
  }
}

Input Schema

NameRequiredDescriptionDefault
gramsNoServing weight in grams. Defaults to 100.
fdc_idsYesFoodData Central ids to compare, 1-10.

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.8/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, non-destructive, closed-world behavior, so the safety profile is covered. The description adds genuine behavioral context beyond that: it documents that unloadable ids appear in failed and that partial signals an incomplete comparison, which tells the agent how to interpret degraded results.

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?

The core operation is front-loaded in one sentence, followed by two focused sentences on result semantics; there is essentially no filler. Minor tightening is possible in the field prose, but structure is sound.

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?

With an output schema present, the description needn't restate return values, yet it still explains the two non-obvious result markers (failed, partial) that an agent would otherwise have to infer. Combined with full schema coverage and clear annotations, nothing needed for correct invocation is missing.

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 coverage is 100%, including the grams default and the 1-10 bound on fdc_ids, so the schema does the heavy lifting. The description reinforces the shared-serving-weight interpretation of grams but adds no format or edge-case detail beyond that, matching the baseline 3.

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?

The first sentence names a specific verb (puts side by side) and resource (several foods) plus the normalizing constraint (same serving weight), which clearly separates it from single-food siblings like get_food_nutrition and search_foods. It stops short of naming any sibling explicitly, so it lands at a clear 4 rather than a 5.

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

Usage Guidelines3/5

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

Use is implied by the notion of comparing multiple foods at a common serving weight, but there is no explicit when-to-use or when-not-to-use statement and no routing to alternatives such as get_food_nutrition for a single item. Adequate but with a real gap.

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