Log Food (diary write)
log_foodMUTATES the authenticated user Food Diary and calendar. Use when they ate or drank — do not store this as a chat memory. Supports dish_items for multiple named dishes with optional price and rating. Example: “I had Mee Pok for late lunch with my parents” → log_food({ what: "Mee Pok", kind: "meal", meal_period: "late lunch", with: ["my parents"] }). Optional: calories (user-stated kilocalories), place/merchant, amount, consumed_at (ISO). Explicit calories override the automatic heuristic. Resolves with/Mum/Dad via person aliases; unknown names do not fail the food write. Tags companions on the mirrored event. Rebuilds life_state. Requires API key or OAuth with scope context. Share tokens cannot write. ($0.10; API key required)
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": {
"what": "<what>"
},
"name": "log_food"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| kind | No | Meal type: meal, snack or drink, e.g. meal. | |
| what | Yes | What they ate or drank (required). Example: Mee Pok | |
| with | No | Companion names, aliases, ids, or group tokens. "my parents" / Mum / Dad resolve via aliases; "family" expands to CRM rows with family relationship labels | |
| notes | No | Free-text note, e.g. Follow up next week. | |
| place | No | Venue or location | |
| amount | No | Price if mentioned | |
| paid_by | No | Who paid. A person's name or alias for a third party; "self" / "me" = the user paid (recorded in Finance); "unknown" = payer not known. Not a payment method: use payment_method | |
| calories | No | Kilocalories explicitly stated by the user; overrides the automatic heuristic and is stored with user provenance | |
| currency | No | ISO currency, e.g. SGD | |
| merchant | No | Restaurant, stall, or shop | |
| dish_items | No | Ordered dishes in this entry. Each requires name; price and rating are optional. | |
| expense_id | No | Link this entry to ONE existing Finance transaction you own (UUID from get_expenses / log_expense) instead of recording a new one | |
| person_ids | No | Owned person UUIDs to tag (user-scoped) | |
| request_id | No | Client idempotency key (retries return original result). | |
| consumed_at | No | ISO instant; wins over meal_period | |
| meal_period | No | Spoken period when consumed_at is omitted, e.g. "late lunch" | |
| people_names | No | Alias for with | |
| payment_method | No | How it was paid (cash, card, PayLah, PayNow…). Saved on the Finance transaction; never the payer | |
| idempotency_key | No | Alias for request_id. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| account | No | The Dayze account this data belongs to. With more than one Dayze connection, name it in the answer. | |
| food_id | Yes | ||
| message | Yes | ||
| event_id | Yes | ||
| food_log | Yes | Saved Food Diary row. | |
| provenance | No | Which connector wrote the record and which connected Dayze account received it. | |
| request_id | No | The request key used for exact replay of this food write. | |
| inspect_url | No | The Dayze page that shows the saved record. | |
| inspect_note | No | What inspect_url opens. Never quote the record id. | |
| people_tagged | Yes | ||
| unresolved_people | Yes | ||
| life_state_rebuilt | Yes |