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