get_nutrient_contributors
Top logged foods and supplements contributing to ONE nutrient over a day or short range, highest amount first. Use for "what gave me most of my sodium today" or "what's driving my potassium this week".
INFER -- do not ask:
date: default to today (resolved in the user's own timezone)
days: default to 1 (just
date); set higher for a range ending ondatelimit: default to 10
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 per-contributor unit field it would otherwise repeat on every row. A nutrient outside that dictionary has no id, so key/unit are used regardless of format. 'verbose' always uses key/unit and keeps unit on every contributor, 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
| Name | Required | Description | Default |
|---|---|---|---|
| date | No | End date (or the only date if days=1). Format: YYYY-MM-DD. Optional -- omit for today. | |
| days | No | How many days, ending on date. Optional -- default 1. | |
| limit | No | Max contributors to return. Optional -- default 10. | |
| format | No | compact (default) packs values by nutrient id, see FORMAT above. verbose spells out each nutrient's name and unit. | |
| nutrient | Yes | Nutrient name or alias, e.g. "vitamin_d", "calcium", "b12". Required. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes | Human-readable result text returned by the tool. |