Log a meal
log_mealAdd foods to the user's Marrow food diary. Marrow on their phone applies the entry (labelled as added by you) and writes it to Apple Health. One call per meal. Every item needs calories and macros for the portion actually eaten: use label or database values when you have them, otherwise your best estimate, and tell the user which. Check nutrition_log first when they say 'the same as yesterday'. Returns an id that undo_entry accepts and the entry_ids of its foods. To correct one food later use edit_entry, to remove it delete_entry.
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": {
"items": "<items>"
},
"name": "log_meal"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| day | No | YYYY-MM-DD on the user's phone (default today, up to 30 days back, never the future) | |
| meal | No | Default: by time of day | |
| time | No | HH:MM, 24 hour, phone time (optional) | |
| items | Yes | ||
| idempotency_key | No | Optional. The same key never logs twice. Use a new one to log an identical entry again on purpose. |