Skip to main content
Glama

Nutrients: proof-backed nutrition data

compare

Read-only

Items side by side on one basis: per_100g, per_serving or per_100kcal.

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": {
      "ids": "<ids>"
    },
    "name": "compare"
  }
}

Input Schema

NameRequiredDescriptionDefault
idsYes
basisNoper_100g
fieldsNoNutrient keys, e.g. energy, protein

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"
    • removedInput schema / properties / basis / type
      Removed value: -"string"
    • 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
    • removedInput schema / properties / ids / items / description
      Removed value: -"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>."
    • removedInput schema / properties / ids / items / maxLength
      Removed value: -64
    • removedInput schema / properties / ids / items / minLength
      Removed value: -3
    • removedInput schema / properties / ids / maxItems
      Removed value: -20
    • removedInput schema / properties / ids / minItems
      Removed value: -2
  2. Changed1 schema field changed
    • changedInput schema / properties / ids / items / description
      Previous value: -"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>."New value: +"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>."
  3. First observed

TDQS

C2.4/5.0
Behavior2/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so the safety profile is covered. Beyond that the description adds essentially nothing: it does not say what a comparison result looks like, how items with missing nutrients are handled, or whether the basis is normalized across heterogeneous items.

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

Conciseness3/5

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

A single short sentence with no wasted words, but the brevity comes at the cost of under-specification rather than tightness; the basis list is front-loaded while the actual operation is not.

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?

With three parameters, low schema coverage, and no output schema, the description should carry meaning about inputs and results but instead supplies one elliptical sentence. An agent cannot reliably determine what to pass as ids or how to interpret the returned comparison.

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 description coverage is only 33%. Only 'fields' is documented in the schema, and the description merely repeats the 'basis' enum values without explaining normalization semantics. The required 'ids' parameter (what identifiers, from which tool) is left completely unexplained in both description and schema.

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?

'Items side by side on one basis' gestures at comparing items, and the basis enumeration hints the domain is nutrition, but the verb is elided and the resource ('items' of what kind, comparing which values) is never stated. An agent must infer from the name and the per_100g/per_serving values that this is a nutrient comparison tool.

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 versus siblings such as nutrition, check_intake, compute_recipe or reference_values, and no prerequisites (e.g. where ids come from, whether all items must share a basis). The definition only lists valid basis values.

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