Skip to main content
Glama

List USDA Nutrients

usda_list_nutrients
Read-only

Look up the FDC nutrient reference table — 269 nutrients with their numeric IDs, names, SR reference numbers, units, and categories. Use to resolve a nutrient name (e.g. "vitamin C") to its FDC ID (1162) before passing it to the nutrients[] filter on other tools. Pass query to match a name, ID, or SR number, and category (macronutrients, vitamins, minerals, lipids, amino_acids, or other) to narrow to one group. The data is static — call once and reuse the IDs.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "usda_list_nutrients"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryNoPart of a nutrient name, matched case-insensitively (e.g. "lutein", "18:1"), or a whole FDC nutrient ID ("1062") or SR number ("268"). Combines with category. A blank query is ignored.
categoryNoFilter to a nutrient category. Options: macronutrients, vitamins, minerals, lipids, amino_acids, other. Omit both category and query to list all 269 tracked nutrients.

Output Schema

NameRequiredDescriptionDefault
errorNoPresent when the call failed. Absent on success.
noticeNoPresent when no nutrient matches the filters: what to try instead.
nutrientsNoNutrient reference entries matching category and query, or the whole table when both are omitted. Grouped by category, in FDC rank order within each.
effectiveQueryNoThe trimmed query, echoed when no nutrient matches it.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / properties / category / description
      Previous value: -"Filter to a nutrient category. Omit to return all ~150 tracked nutrients. Options: macronutrients, vitamins, minerals, lipids, amino_acids, other."New value: +"Filter to a nutrient category. Options: macronutrients, vitamins, minerals, lipids, amino_acids, other. Omit both category and query to list all 269 tracked nutrients."
    • addedInput schema / properties / query
      Added value: +{
      +  "description": "Part of a nutrient name, matched case-insensitively (e.g. \"lutein\", \"18:1\"), or a whole FDC nutrient ID (\"1062\") or SR number (\"268\"). Combines with category. A blank query is ignored.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / effectiveQuery
      Added value: +{
      +  "description": "The trimmed query, echoed when no nutrient matches it.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Present when no nutrient matches the filters: what to try instead.",
      +  "type": "string"
      +}
    • changedOutput schema / properties / nutrients / description
      Previous value: -"Nutrient reference entries matching the requested category, or all if category is omitted."New value: +"Nutrient reference entries matching category and query, or the whole table when both are omitted. Grouped by category, in FDC rank order within each."
    • changedOutput schema / properties / nutrients / items / properties / number / description
      Previous value: -"SR reference number (legacy identifier, e.g. \"203\")."New value: +"SR reference number (legacy identifier, e.g. \"203\"); empty when FDC assigns none."
  2. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "nutrients"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode.",
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "nutrients"
      -]
  3. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare readOnlyHint=true and openWorldHint=false, so safety is covered. The description adds genuinely useful behavioral facts beyond that: the dataset is static and small (269 entries), the results are stable IDs, and it should be called once and reused rather than per-request.

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?

Four tight sentences, front-loaded with the resource and its purpose, then the workflow, then the parameters, then the caching tip. The category enumeration restates the schema enum, which is mild redundancy but minor.

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

Completeness5/5

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

With full schema coverage, an output schema, and read-only annotations, the description covers everything an agent needs: what the table is, how to query it, and how to reuse results. No material gap remains.

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 description coverage is 100%, so the baseline is 3, but the description adds a concrete resolution example ("vitamin C" → 1162) that shows the intended name-to-ID workflow, and explains that query and category combine to narrow the result set. Enough added meaning to move above baseline.

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

Purpose5/5

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

States a specific verb and resource ("Look up the FDC nutrient reference table"), quantifies it (269 nutrients) and names the exact fields returned (numeric IDs, names, SR reference numbers, units, categories). That framing makes it clearly the lookup/reference tool, distinct from the food-oriented siblings.

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

Usage Guidelines4/5

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

Gives explicit usage context: resolve a nutrient name to its FDC ID before passing it to the nutrients[] filter on other tools, plus the caching guidance "The data is static — call once and reuse the IDs." It stops short of stating when NOT to use it (e.g. that it returns no per-food nutrient values), so it is strong but not fully exhaustive.

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.