Skip to main content
Glama

Tally food nutrients

Nutrients in a food

get_food_nutrients
Read-onlyIdempotent

Calories, macros and up to 26 micronutrient lines (vitamins, minerals, fiber, omega-3, polyphenols) for a portion of one food, each as a share of the EU daily reference value. A nutrient the table has no value for is listed under no_value_in_table, never reported as zero.

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": {
      "food": "<food>"
    },
    "name": "get_food_nutrients"
  }
}

Input Schema

NameRequiredDescriptionDefault
foodYesAn id from search_foods (preferred), or a food name.
gramsNoPortion in grams. Default 100.

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, so safety is covered; the description adds genuinely new behavior: results are expressed as a share of the EU daily reference value, capped at 26 micronutrient lines, and missing values surface under no_value_in_table rather than as zero. The remaining gap is failure behavior for an unknown food name or an out-of-range portion, which is left unstated.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences, zero filler, and the payload description is front-loaded before the no_value_in_table caveat. Every clause carries information an agent would otherwise have to guess.

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 no output schema, the description carries the return-value burden and largely discharges it: it specifies the nutrient categories, the percentage-of-DRV representation, and the missing-data convention. What it omits is error/edge behavior for an unresolvable food argument, which matters for a two-parameter lookup tool but is a modest gap.

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%, so both parameters are already documented, including the 100g default and 5000g ceiling. The description reinforces that results are per-portion and percentage-based, but adds no syntax, format, or edge-case meaning beyond what the schema provides — the baseline of 3 applies.

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 description names the exact payload (calories, macros, up to 26 micronutrient lines) scoped to 'a portion of one food', which is concrete enough to distinguish it from search_foods, the sibling that supplies ids. It stops short of an explicit verb+resource framing like 'Returns nutrients for a food id', but the scope and content are 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?

Usage is only implied: the reader infers this is the lookup step after obtaining a food id. The description itself never says 'use after search_foods' or when not to call it (e.g. for packaged/branded items or multi-food comparisons); that linkage lives only in the schema's 'An id from search_foods (preferred)' note.

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