Skip to main content
Glama

Get nutrients of a food

get_nutrients
Read-only

Retrieve a TACO food's nutrient composition by ID, scaled to a gram amount or per 100 g, with missing and trace values reported explicitly instead of as zero.

Instructions

Full composition of one TACO food by id (from search_food), per 100 g or scaled to a quantity in grams. Missing data is reported as null (not analyzed) or {"trace":true}, never as 0.

Input Schema

NameRequiredDescriptionDefault
gramsNoQuantity in grams of edible portion. Omit for the table basis of 100 g.
food_idYesTACO food number, as returned by search_food.
nutrientsNoNutrient keys to return (e.g. "energy_kcal", "protein_g", "iron_mg"). Omit for all.

Output Schema

NameRequiredDescriptionDefault
foodYes
notesYesCaveats about this food or this answer.
scaledYesTrue when amounts were computed from the per-100 g table values for another quantity.
sourceYesCitation for the data.
nutrientsYesRequested nutrients, in table order.
basis_gramsYesQuantity the amounts refer to, in grams of edible portion.
trace_nutrientsYesKeys reported as trace (Tr).
not_analyzed_nutrientsYesKeys with no value in the TACO table; not zero.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.2.0

TDQS

A3.8/5.0
Behavior4/5

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

readOnlyHint=true already tells the agent this is a safe read, so the bar is lower, and the description adds real value on top: missing nutrients come back as null or {"trace":true} and never as 0. That distinction materially changes how an agent interprets results and is not in the schema or annotations.

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?

A single dense sentence with the resource and identifier front-loaded, followed by two qualifying clauses. No wasted words, though the missing-data clause is compressed to the point of being terse.

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?

With an output schema present, return structure needn't be explained, and all three parameters are documented in the schema. The description covers scaling basis and null/trace semantics, leaving only minor gaps such as behavior on an invalid or unknown food_id.

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

Parameters4/5

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

Schema coverage is 100%, making 3 the baseline, but the description adds meaning beyond it by stating the default basis (100 g) and the scaling behavior for the grams parameter, plus the provenance of food_id. The nutrients array is left entirely to the schema.

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?

States a specific verb and resource ("Full composition of one TACO food by id") with clear scope: one food, full nutrient table. "Full composition" implicitly contrasts with the partial-output siblings get_fatty_acids and get_amino_acids, though it never names them.

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?

The parenthetical "(from search_food)" establishes the prerequisite lookup chain, which is genuine usage guidance. However, it gives no when-not-to-use condition and does not mention the sibling tools that return subsets of the same data.

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