Recent Foods reference
List the foods the user logged most recently, with the ids log_food_entry takes.
The DailyGoal API is not available on the Free plan. It works with a paid plan or during a free trial. See plans.
Operations
list_recent_foods: List recent foods
list_recent_foods
GET https://api.dailygoal.fit/v1/recent-foods
MCP tool list_recent_foods · Read-only
Lists up to 30 foods, custom foods and saved meals the user logged most recently, newest first, with when each was last logged, whether it is a favourite, and the ids log_food_entry takes. Use it to log something the user eats often. For the diary itself use list_food_entries; for favourites use list_favorite_foods.
Input
This operation takes no input.
Output
| Field | Type | Description |
|---|---|---|
| foods | object[] | The foods the user logged most recently, newest first. At most 30. |
| foods[].id | string | |
| foods[].kind | "food" | "custom_food" | "saved_meal" | food: the DailyGoal catalogue. custom_food: a food the user created. saved_meal: a meal the user saved, logged as one entry. |
| foods[].name | string | |
| foods[].brandNameoptional | string | |
| foods[].serving | object | |
| foods[].serving.size | number | |
| foods[].serving.unit | string | |
| foods[].serving.textoptional | string | |
| foods[].perServing | object | |
| foods[].perServing.calories | number | kcal |
| foods[].perServing.protein | number | grams |
| foods[].perServing.carbs | number | grams |
| foods[].perServing.fat | number | grams |
| foods[].perServing.alcohol | number | grams |
| foods[].per100g | object | Foods: nutrition per 100 g/ml. Saved meals: stored whole-recipe nutrition; use perServing for logging. |
| foods[].per100g.calories | number | kcal |
| foods[].per100g.protein | number | grams |
| foods[].per100g.carbs | number | grams |
| foods[].per100g.fat | number | grams |
| foods[].per100g.alcohol | number | grams |
| foods[].isFavorite | boolean | |
| foods[].lastUsedAt | string | When the user last logged this food, as an ISO 8601 UTC timestamp. |
Example request
curl "https://api.dailygoal.fit/v1/recent-foods" \
-H "Authorization: Bearer $DAILYGOAL_API_TOKEN"{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_recent_foods",
"arguments": {}
}
}Example response
Synthetic data. REST returns this object as the body; MCP returns it as structuredContent.
{
"foods": [
{
"id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
"kind": "food",
"name": "Rolled oats",
"serving": {
"size": 40,
"unit": "g",
"text": "40 g"
},
"perServing": {
"calories": 152,
"protein": 5.3,
"carbs": 27.1,
"fat": 2.6,
"alcohol": 0
},
"per100g": {
"calories": 379,
"protein": 13.2,
"carbs": 67.7,
"fat": 6.5,
"alcohol": 0
},
"isFavorite": true,
"lastUsedAt": "2026-09-14T07:42:00.000Z"
},
{
"id": "j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca",
"kind": "custom_food",
"name": "Greek yoghurt 2%",
"serving": {
"size": 150,
"unit": "g",
"text": "1 pot"
},
"perServing": {
"calories": 110,
"protein": 14.9,
"carbs": 5.9,
"fat": 3,
"alcohol": 0
},
"per100g": {
"calories": 73.2,
"protein": 9.9,
"carbs": 3.9,
"fat": 2,
"alcohol": 0
},
"isFavorite": true,
"lastUsedAt": "2026-09-13T15:10:00.000Z"
}
]
}Errors
unauthorized(401)origin_not_allowed(403)misdirected_request(421)subscription_required(403)rate_limited(429)internal_error(500)