Skip to main content
Glama
nutrition-mcp

nutrition-mcp

compute_meal

Read-onlyIdempotent

Calculate per-item and total nutrients and glycemic load for a meal of up to 30 foods by ID, amount, and unit, returning named errors and lower-bound warnings instead of manual addition.

Instructions

Per-item and total nutrients and glycemic load for a meal of 1 to 30 items, each a food id, amount and unit as in get_nutrition. Use this for any total instead of adding numbers yourself. If an item fails, the error names it and no totals are returned. Totals listed in total_incomplete are lower bounds, and glycemic_load_missing names the items the meal's glycemic load leaves out. A dish's folate, vitamin C and vitamin B12 are totals of its raw ingredients, with no cooking losses applied; each item names them in raw_ingredient_totals, and a meal total that includes a dish carries the same caveat. Values are rounded to 2 decimals, so 0.0 can be a small amount; a value the source does not report is null, never 0.

Input Schema

NameRequiredDescriptionDefault
itemsYes

Output Schema

NameRequiredDescriptionDefault
itemsYes
totalYesNutrient amounts, the sum over the items.
glycemic_loadYes
total_incompleteYes
glycemic_load_missingYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Annotations only cover the read-only/idempotent/closed-world profile, and the description goes well beyond them: atomic failure behavior ('If an item fails, the error names it and no totals are returned'), lower-bound semantics via `total_incomplete`, partial coverage of glycemic load, the no-cooking-loss caveat for folate/vitamin C/B12, 2-decimal rounding, and null-vs-0 convention. These are exactly the traits an agent needs to interpret results correctly.

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?

Front-loads purpose and scope in the first clause, then layers caveats in decreasing order of importance: failure atomicity, lower bounds, cooking-loss caveat, rounding/null convention. Dense but every sentence carries an operational fact; slightly long, though nothing is filler.

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?

An output schema exists, yet the description still pre-explains the fields an agent is most likely to misread (`total_incomplete` as lower bounds, `glycemic_load_missing`, `raw_ingredient_totals`). Combined with the error and rounding semantics, an agent can call this and correctly interpret edge-case results with no further information.

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?

Top-level schema description coverage is reported as 0%, so the description has to compensate, and it does partially: it fixes the item count range and routes the agent to get_nutrition for argument format. However, the amount/unit/food_id semantics it relies on are only implicit ('each a food id, amount and unit'), and the nested $defs do the real work, so this is adequate rather than additive.

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 (compute) and resource (meal nutrients and glycemic load) with explicit scope: 1 to 30 items, each a food id + amount + unit. The mention of 'as in get_nutrition' and the totals framing lets an agent distinguish it from the single-item sibling get_nutrition and from search_food/find_foods without opening any schema.

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?

Gives a clear directive: 'Use this for any total instead of adding numbers yourself,' which tells the agent when to reach for this over manual arithmetic or repeated get_nutrition calls. It stops short of explicitly excluding the single-item sibling or naming a failure-mode alternative, so it is clear context rather than full when/when-not guidance.

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