Skip to main content
Glama

nutrition-intelligence

compute_recipe

Exact nutrition for a recipe: the sum of its ingredient lines (text or ids). Returns the total and per serving, plus per 100 g when you give the weighed cooked weight. Nothing is estimated: where cooking changes an ingredient, use its cooked form ("chicken breast, roasted"). A value whose coverage is below 1 is a lower bound; missing_from lists the ingredients without it, and a line that matched nothing counts against coverage.

Input Schema

NameRequiredDescriptionDefault
linesYes
fieldsNoOnly return these nutrient keys (e.g. ["energy","protein"]). Saves tokens. A group name returns every key under it, each as its own value in its own unit, never added or converted: "vitamin_a" gives vitamin_a.rae (µg) and vitamin_a.iu (IU); "carbohydrate" gives carbohydrate.total (includes fibre), carbohydrate.available (excludes it) and carbohydrate.available_mse. A key that is itself a registry key (e.g. "fat") is just that key. A name that matches nothing comes back missing with the closest keys.
localeNoBCP 47 locale, e.g. en-US, en-GB, ja-JP. Decides household measure sizes (a US cup is 236.6 ml, a metric cup 250 ml).
servingsNo
cooked_weight_gNoWeighed cooked weight of the whole dish. Without it, per_100g is null.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A3.7/5.0
Behavior4/5

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

With no annotations supplied, the description carries the full behavioral burden and does so well: it discloses the return shape (total, per serving, conditional per 100 g), the no-estimation policy, and the coverage semantics including that unmatched lines count against coverage and missing_from lists gaps. It stops short of stating side-effect-free/read-only behavior or limits on line count, keeping it below a 5.

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 output shape and the key caveat (nothing is estimated) are front-loaded, and each sentence contributes distinct information. The final sentence on coverage/missing_from is dense and slightly jargon-heavy, but nothing is redundant.

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?

For a 5-parameter computation tool with no output schema and no annotations, the description covers the essential behavior: inputs, output shape, and the coverage/lower-bound caveat. The gaps are secondary semantics for fields and locale, which the description leaves entirely to the schema.

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 60%, so the schema already documents lines, cooked_weight_g, unit and quantity in detail. The description adds meaning only for 'lines (text or ids)' and the cooked_weight_g → per_100g relationship, while fields, locale and servings receive no treatment in the description at all, so it does not fully compensate for the coverage gap.

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?

Opens with a specific verb and resource: 'Exact nutrition for a recipe: the sum of its ingredient lines (text or ids)', which immediately tells an agent what it produces and from what inputs. It does not name any sibling tool (e.g. nutrition, label_lines) to differentiate itself, so it falls short of a 5, but the purpose itself is unambiguous.

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?

Offers real input-level guidance ('where cooking changes an ingredient, use its cooked form') and states a condition for cooked_weight_g, which is implied by 'plus per 100 g when you give the weighed cooked weight'. However, it never says when to choose this over sibling tools like nutrition or label_lines, and names no exclusions, so usage is only implied.

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