add_pantry_item
Add a food to the user's pantry, or UPDATE it if it's already there (matched by name, any casing) — e.g. 'add rolled oats to my pantry'. Only name is required; include macros (for one serving), a serving label, a source, and a short note when you know them, so a later log can reuse them. Re-adding the same food REPLACES its details (an upsert — it never creates a duplicate). Only pass a source you actually got from search_foods/lookup_barcode; an unrecognized value is recorded as the user's own estimate ('client'). This does NOT log a meal — it only curates the user's staples.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | The food to keep on hand, e.g. 'rolled oats'. | |
| note | No | Optional short note, e.g. 'the Costco tub'. | |
| macros | No | Macros for ONE serving of this food, when known. | |
| source | No | Where the macros came from, if grounded via search_foods/lookup_barcode (e.g. 'usda'). Defaults to your own estimate ('client'); unrecognized values are recorded as 'client'. | |
| serving | No | Serving label the macros are for, e.g. '1 cup' or 'per 100 g'. |