Skip to main content
Glama

Nutrients: proof-backed nutrition data

nutrition

Read-only

Totals and per-item values for ids and phrases, with coverage; unknown is never zero. Check assumed on text lines. Misses carry contribute.

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": {
      "items": "<items>"
    },
    "name": "nutrition"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYes
fieldsNoNutrient keys, e.g. energy, protein
localeNo
regimeNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed9 schema fields changed
    • removedInput schema / $schema
      Removed value: -"https://json-schema.org/draft/2020-12/schema"
    • changedInput schema / properties / fields / description
      Previous value: -"Only 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."New value: +"Nutrient keys, e.g. energy, protein"
    • removedInput schema / properties / fields / maxItems
      Removed value: -100
    • changedInput schema / properties / items / items / anyOf
      Previous value: -[
      -  {
      -    "description": "A phrase, as resolve takes it: \"2 large eggs\".",
      -    "maxLength": 300,
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  {
      -    "properties": {
      -      "id": {
      -        "description": "Entity id, e.g. fd_k3m9x2q8vt7w4p (food), pr_ (product), sp_ (supplement), mi_ (menu item), rc_ (recipe). A source id also works: fdc:<USDA fdcId>, ndb:<NDB number>, dsld:<DSLD id>, fndds:<food code>, lnhpd:<LNHPD id>, ciqual:<alim_code>, cnf:<food code>, cofid:<food code>, matvaretabellen:<food id>, slv:<Livsmedelsverket number>.",
      -        "maxLength": 64,
      -        "minLength": 3,
      -        "type": "string"
      -      },
      -      "quantity": {
      -        "description": "Defaults to 1.",
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      },
      -      "text": {
      -        "description": "Free text instead of an id, e.g. \"2 large eggs scrambled\". Resolved first.",
      -        "maxLength": 300,
      -        "type": "string"
      -      },
      -      "unit": {
      -        "description": "g, oz, ml, cup, tbsp, serving, slice, capsule... Defaults to \"serving\" for products and supplements, \"g\" with quantity 100 otherwise.",
      -        "maxLength": 32,
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "id": {
      +        "type": "string"
      +      },
      +      "quantity": {
      +        "type": "number"
      +      },
      +      "text": {
      +        "type": "string"
      +      },
      +      "unit": {
      +        "type": "string"
      +      }
      +    }
      +  }
      +]
    • removedInput schema / properties / items / maxItems
      Removed value: -200
    • removedInput schema / properties / items / minItems
      Removed value: -1
    • removedInput schema / properties / locale / description
      Removed value: -"BCP 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)."
    • removedInput schema / properties / locale / maxLength
      Removed value: -16
    • removedInput schema / properties / regime / description
      Removed value: -"With fields: add values derivable for this regime to every item and the totals (e.g. EU adds salt from sodium), each marked derived_from. Without it, a requested field only sodium can give is null with a reason saying so."
  2. Changed1 schema field changed
    • addedInput schema / properties / regime
      Added value: +{
      +  "description": "With fields: add values derivable for this regime to every item and the totals (e.g. EU adds salt from sodium), each marked derived_from. Without it, a requested field only sodium can give is null with a reason saying so.",
      +  "type": "string"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / items / items / anyOf
      Previous value: -[
      -  {
      -    "description": "A phrase, as resolve takes it: \"2 large eggs\".",
      -    "maxLength": 300,
      -    "minLength": 1,
      -    "type": "string"
      -  },
      -  {
      -    "properties": {
      -      "id": {
      -        "description": "Entity id, e.g. fd_k3m9x2q8vt7w4p (food), pr_ (product), sp_ (supplement), mi_ (menu item), rc_ (recipe). A source id also works: fdc:<USDA fdcId>, ndb:<NDB number>, dsld:<DSLD id>, fndds:<food code>.",
      -        "maxLength": 64,
      -        "minLength": 3,
      -        "type": "string"
      -      },
      -      "quantity": {
      -        "description": "Defaults to 1.",
      -        "exclusiveMinimum": 0,
      -        "type": "number"
      -      },
      -      "text": {
      -        "description": "Free text instead of an id, e.g. \"2 large eggs scrambled\". Resolved first.",
      -        "maxLength": 300,
      -        "type": "string"
      -      },
      -      "unit": {
      -        "description": "g, oz, ml, cup, tbsp, serving, slice, capsule... Defaults to \"serving\" for products and supplements, \"g\" with quantity 100 otherwise.",
      -        "maxLength": 32,
      -        "type": "string"
      -      }
      -    },
      -    "type": "object"
      -  }
      -]New value: +[
      +  {
      +    "description": "A phrase, as resolve takes it: \"2 large eggs\".",
      +    "maxLength": 300,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "id": {
      +        "description": "Entity id, e.g. fd_k3m9x2q8vt7w4p (food), pr_ (product), sp_ (supplement), mi_ (menu item), rc_ (recipe). A source id also works: fdc:<USDA fdcId>, ndb:<NDB number>, dsld:<DSLD id>, fndds:<food code>, lnhpd:<LNHPD id>, ciqual:<alim_code>, cnf:<food code>, cofid:<food code>, matvaretabellen:<food id>, slv:<Livsmedelsverket number>.",
      +        "maxLength": 64,
      +        "minLength": 3,
      +        "type": "string"
      +      },
      +      "quantity": {
      +        "description": "Defaults to 1.",
      +        "exclusiveMinimum": 0,
      +        "type": "number"
      +      },
      +      "text": {
      +        "description": "Free text instead of an id, e.g. \"2 large eggs scrambled\". Resolved first.",
      +        "maxLength": 300,
      +        "type": "string"
      +      },
      +      "unit": {
      +        "description": "g, oz, ml, cup, tbsp, serving, slice, capsule... Defaults to \"serving\" for products and supplements, \"g\" with quantity 100 otherwise.",
      +        "maxLength": 32,
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
  4. Changed3 schema fields changed
    • addedInput schema / properties / items / items / anyOf
      Added value: +[
      +  {
      +    "description": "A phrase, as resolve takes it: \"2 large eggs\".",
      +    "maxLength": 300,
      +    "minLength": 1,
      +    "type": "string"
      +  },
      +  {
      +    "properties": {
      +      "id": {
      +        "description": "Entity id, e.g. fd_k3m9x2q8vt7w4p (food), pr_ (product), sp_ (supplement), mi_ (menu item), rc_ (recipe). A source id also works: fdc:<USDA fdcId>, ndb:<NDB number>, dsld:<DSLD id>, fndds:<food code>.",
      +        "maxLength": 64,
      +        "minLength": 3,
      +        "type": "string"
      +      },
      +      "quantity": {
      +        "description": "Defaults to 1.",
      +        "exclusiveMinimum": 0,
      +        "type": "number"
      +      },
      +      "text": {
      +        "description": "Free text instead of an id, e.g. \"2 large eggs scrambled\". Resolved first.",
      +        "maxLength": 300,
      +        "type": "string"
      +      },
      +      "unit": {
      +        "description": "g, oz, ml, cup, tbsp, serving, slice, capsule... Defaults to \"serving\" for products and supplements, \"g\" with quantity 100 otherwise.",
      +        "maxLength": 32,
      +        "type": "string"
      +      }
      +    },
      +    "type": "object"
      +  }
      +]
    • removedInput schema / properties / items / items / properties
      Removed value: -{
      -  "id": {
      -    "description": "Entity id, e.g. fd_k3m9x2q8vt7w4p (food), pr_ (product), sp_ (supplement), mi_ (menu item), rc_ (recipe). A source id also works: fdc:<USDA fdcId>, ndb:<NDB number>, dsld:<DSLD id>, fndds:<food code>.",
      -    "maxLength": 64,
      -    "minLength": 3,
      -    "type": "string"
      -  },
      -  "quantity": {
      -    "description": "Defaults to 1.",
      -    "exclusiveMinimum": 0,
      -    "type": "number"
      -  },
      -  "text": {
      -    "description": "Free text instead of an id, e.g. \"2 large eggs scrambled\". Resolved first.",
      -    "maxLength": 300,
      -    "type": "string"
      -  },
      -  "unit": {
      -    "description": "g, oz, ml, cup, tbsp, serving, slice, capsule... Defaults to \"serving\" for products and supplements, \"g\" with quantity 100 otherwise.",
      -    "maxLength": 32,
      -    "type": "string"
      -  }
      -}
    • removedInput schema / properties / items / items / type
      Removed value: -"object"
  5. First observed

TDQS

C2.4/5.0
Behavior3/5

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

The annotations already establish readOnlyHint=true and openWorldHint=false, so the safety profile is covered. The description adds that unknown is never zero and that misses carry contribute, which is useful behavioral context, but these points are too terse to be fully actionable.

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

Conciseness2/5

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

The text is short but poorly structured, mixing a main clause with fragments like "Check assumed on text lines. Misses carry contribute." These sentences do not earn their place because they are not self-explanatory.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a 4-parameter tool with low schema description coverage and no output schema, the description is far too sparse. It does not explain return format, how coverage is reported, or the roles of fields, locale, and regime.

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

Parameters2/5

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

Schema coverage is only 25%, and the description barely compensates. It hints that items can be ids or phrases, but it never explains fields, locale, regime, unit, quantity, or what "coverage" means in the response.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose3/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description says it returns "Totals and per-item values for ids and phrases, with coverage," which indicates a computation over food items. However, it never explicitly names nutrition data or a clear verb+resource, and phrases like "coverage" and "ids and phrases" remain vague without the tool name.

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

Usage Guidelines2/5

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

There is no guidance on when to use this tool versus siblings like check_intake, compute_recipe, or reference_values. The clauses about checking assumptions and misses are cryptic hints, not usage conditions or exclusions.

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