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 for "show my vitamin D over the last month" or "am I usually over on sodium". Only dates with logged data are returned.

INFER -- do not ask:

  • days: default to 30

  • end_date: default to today (resolved in the user's own timezone)

nutrient is required and 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 regardless of format. 'verbose' always uses key/unit, as before.

DATA COMPLETENESS: totals are sums over the logged items that carry a value for that nutrient; coverage tells how many did. Say "based on foods with X data" when coverage is partial; never call a low intake a deficiency; intake is not a lab result; supplement vs food split is reported separately. A daily supplement counts on every day it's active by default -- the user isn't 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.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
daysNoHow many days of history, ending on end_date. Optional -- default 30.
formatNocompact (default) packs values by nutrient id, see FORMAT above. verbose spells out each nutrient's name and unit.
end_dateNoLast date of the window. Format: YYYY-MM-DD. Optional -- omit for today.
nutrientYesNutrient name or alias, e.g. "vitamin_d", "calcium", "b12". Required.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYesHuman-readable result text returned by the tool.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Added

TDQS

A4.6/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, non-destructive), and the description adds substantial behavior beyond them: only dates with logged data are returned, the compact/verbose output distinction, and the non-obvious supplement rule (a daily supplement counts on every active day unless explicitly marked not taken). It also warns against misinterpreting intake as a lab result or a deficiency, which materially affects how the agent should report results.

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?

The purpose is front-loaded in the first sentence, and the INFER/FORMAT/DATA COMPLETENESS sections are clearly delimited. It is long, but the length is largely justified by the tool's complexity (two output modes, alias handling, supplement counting); some of the FORMAT prose could be tightened.

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 tool with an output schema, four parameters, and non-obvious data semantics, the description covers everything an agent needs: what is returned, which dates are included, default inference, alias support, and the caveats required to report intake honestly. Nothing material is missing.

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: it confirms nutrient accepts common aliases ('b12', 'carbs', 'fibre'), restates the days/end_date defaults in user-facing terms, and explains what 'format' actually changes in the payload. This goes beyond the schema's field-level descriptions.

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 with scope: '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.' It also implicitly distinguishes itself from the aggregate sibling get_nutrient_summary (which it references for the nutrient dictionary) and from get_nutrient_contributors. An agent can tell exactly what this returns without opening the schema.

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 usage examples ('show my vitamin D over the last month', 'am I usually over on sodium') and explicit inference rules for days/end_date defaults, which is strong context. It does not, however, explicitly state when to prefer get_nutrient_summary or get_nutrient_contributors over this tool, so the routing 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.