Skip to main content
Glama

get_nutrient_history

Read-onlyIdempotent

Day-by-day history for ONE nutrient over a range, with its target, how many days met it, and how many days went over the upper limit. use: "show my vitamin D over the last month", "am I usually over on sodium". Only dates with logged data are returned. INFER, do not ask: days and end_date; defaults are on the params. nutrient accepts common aliases (e.g. "b12", "carbs", "fibre").

FORMAT: default 'compact' replies with id (this nutrient's number in get_nutrient_summary's nutrient dictionary, whose unit then applies) instead of key/unit, and drops the target's redundant unit field. A nutrient outside that dictionary has no id, so key/unit are used whatever the format. 'verbose' always uses key/unit.

DATA COMPLETENESS: totals sum the logged items that carry a value for the nutrient; coverage says how many did. Partial coverage -> say "based on foods with X data". Never call a low intake a deficiency; intake is not a lab result. Supplement vs food is reported separately. A daily supplement counts on every active day by default (the user is not expected to check it off) unless a day was explicitly marked not taken, so its share of a total can include days with no check-in.

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": {
      "nutrient": "<nutrient>"
    },
    "name": "get_nutrient_history"
  }
}

Input Schema

NameRequiredDescriptionDefault
daysNoDays of history ending on end_date; default 30.
formatNocompact (default) packs values by nutrient id, see FORMAT. verbose spells out each nutrient's name and unit.
end_dateNoLast date of the window, YYYY-MM-DD; omit for today (the user's own timezone).
nutrientYesNutrient name or alias, e.g. "vitamin_d", "calcium", "b12".

Output Schema

NameRequiredDescriptionDefault
resultYesHuman-readable result text returned by the tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed4 schema fields changed
    • changedInput schema / properties / days / description
      Previous value: -"How many days of history, ending on end_date. Optional -- default 30."New value: +"Days of history ending on end_date; default 30."
    • changedInput schema / properties / end_date / description
      Previous value: -"Last date of the window. Format: YYYY-MM-DD. Optional -- omit for today."New value: +"Last date of the window, YYYY-MM-DD; omit for today (the user's own timezone)."
    • changedInput schema / properties / format / description
      Previous value: -"compact (default) packs values by nutrient id, see FORMAT above. verbose spells out each nutrient's name and unit."New value: +"compact (default) packs values by nutrient id, see FORMAT. verbose spells out each nutrient's name and unit."
    • changedInput schema / properties / nutrient / description
      Previous value: -"Nutrient name or alias, e.g. \"vitamin_d\", \"calcium\", \"b12\". Required."New value: +"Nutrient name or alias, e.g. \"vitamin_d\", \"calcium\", \"b12\"."
  2. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already establish a safe, idempotent read, and the description adds substantial context beyond them: format-dependent id vs key/unit output, the rule that only dates with logged data are returned, partial-coverage messaging, separate supplement vs food reporting, and the caution against labeling low intake a deficiency.

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?

Front-loaded with the core purpose and examples, then cleanly sectioned into FORMAT and DATA COMPLETENESS blocks. It is long and dense, and the supplement-counting sentence is convoluted, but nearly every sentence carries operational information.

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?

For a read tool with an output schema and full annotation coverage, this covers the remaining gaps: defaults, alias handling, format tradeoffs, partial data coverage, and the supplement accounting edge case that would otherwise distort totals.

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%, so the baseline is 3, but the description adds real meaning: defaults are on the params and should be inferred rather than asked about, nutrient accepts common aliases like 'b12'/'carbs'/'fibre', and format's compact-vs-verbose effect on id/key/unit is explained in detail.

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 (day-by-day history for ONE nutrient over a range) plus what the response contains: target, days met, days over the upper limit. The 'ONE nutrient' emphasis and the reference to get_nutrient_summary's nutrient dictionary separate it from the aggregate sibling.

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 concrete invocation examples ("show my vitamin D over the last month", "am I usually over on sodium") and an explicit 'INFER, do not ask' rule for days/end_date. It does not state an explicit exclusion against the sibling summary tool, so the when-not boundary is only implied.

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.