Favourite Foods reference
List the user's favourite foods, custom foods and saved meals, and add or remove a favourite.
The DailyGoal API is not available on the Free plan. It works while Pro is active, including during an introductory offer. See plans.
Usage notes
An account can hold at most 200 favourites. Marking a favourite changes the library item, not a food entry.
All operations require Pro or a trial. GET and DELETE take query parameters; other methods take a JSON body. The input table also includes any MCP-only idempotency_key argument; REST sends it as a header. See retrying creates. Example ids are synthetic; find your own with the search and list operations.
Operations
list_favorite_foods: List favourite foodsset_favorite_food: Set favourite food
list_favorite_foods
GET https://api.dailygoal.fit/v1/favorite-foods
MCP tool list_favorite_foods · Read-only · DailyGoal data only
Lists the foods, custom foods and saved meals the user marked as favourites, by name, with per-serving nutrition and the ids log_food_entry takes. To change a favourite use set_favorite_food; for what the user logged lately use list_recent_foods; to find any other food use search_foods.
Input
This operation takes no input.
Full input schema, including bounds and nested alternatives (MCP)
{
"type": "object",
"properties": {}
}Output
| Field | Type | Description |
|---|---|---|
| foods | object[] | The user's favourite foods, custom foods and saved meals, by name. At most 200. |
| 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 |
Full output schema
{
"type": "object",
"properties": {
"foods": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"food",
"custom_food",
"saved_meal"
],
"description": "food: the DailyGoal catalogue. custom_food: a food the user created. saved_meal: a meal the user saved, logged as one entry."
},
"name": {
"type": "string"
},
"brandName": {
"type": "string"
},
"serving": {
"type": "object",
"properties": {
"size": {
"type": "number"
},
"unit": {
"type": "string"
},
"text": {
"type": "string"
}
},
"required": [
"size",
"unit"
],
"additionalProperties": true
},
"perServing": {
"type": "object",
"properties": {
"calories": {
"type": "number",
"description": "kcal"
},
"protein": {
"type": "number",
"description": "grams"
},
"carbs": {
"type": "number",
"description": "grams"
},
"fat": {
"type": "number",
"description": "grams"
},
"alcohol": {
"type": "number",
"description": "grams"
}
},
"required": [
"calories",
"protein",
"carbs",
"fat",
"alcohol"
],
"additionalProperties": true
},
"per100g": {
"type": "object",
"properties": {
"calories": {
"type": "number",
"description": "kcal"
},
"protein": {
"type": "number",
"description": "grams"
},
"carbs": {
"type": "number",
"description": "grams"
},
"fat": {
"type": "number",
"description": "grams"
},
"alcohol": {
"type": "number",
"description": "grams"
}
},
"required": [
"calories",
"protein",
"carbs",
"fat",
"alcohol"
],
"additionalProperties": true,
"description": "Foods: nutrition per 100 g/ml. Saved meals: stored whole-recipe nutrition; use perServing for logging."
}
},
"required": [
"id",
"kind",
"name",
"serving",
"perServing",
"per100g"
],
"additionalProperties": true
},
"description": "The user's favourite foods, custom foods and saved meals, by name. At most 200."
}
},
"required": [
"foods"
],
"additionalProperties": true
}Example request
curl "https://api.dailygoal.fit/v1/favorite-foods" \
-H "Authorization: Bearer $DAILYGOAL_API_TOKEN"{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "list_favorite_foods",
"arguments": {}
}
}Example response
Synthetic data. REST returns this object as the body; MCP returns it as structuredContent.
{
"foods": [
{
"id": "j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca",
"kind": "custom_food",
"name": "Greek yoghurt 2%",
"serving": {
"size": 150,
"unit": "g",
"text": "1 pot"
},
"perServing": {
"calories": 109.8,
"protein": 14.9,
"carbs": 5.9,
"fat": 3,
"alcohol": 0
},
"per100g": {
"calories": 73.2,
"protein": 9.9,
"carbs": 3.9,
"fat": 2,
"alcohol": 0
}
},
{
"id": "j579h2c5m8q1x4v7n0r3t6w9b2y5k8dc",
"kind": "saved_meal",
"name": "Overnight oats with yoghurt and blueberries",
"serving": {
"size": 100,
"unit": "g",
"text": "1/2 of recipe"
},
"perServing": {
"calories": 326.1,
"protein": 20.8,
"carbs": 47.4,
"fat": 5.9,
"alcohol": 0
},
"per100g": {
"calories": 652.3,
"protein": 41.7,
"carbs": 94.9,
"fat": 11.8,
"alcohol": 0
}
}
]
}Errors
unauthorized(401)origin_not_allowed(403)misdirected_request(421)subscription_required(403)rate_limited(429)internal_error(500)
set_favorite_food
PUT https://api.dailygoal.fit/v1/favorite-foods
MCP tool set_favorite_food · Changes data · DailyGoal data only
Adds a food, custom food or saved meal to the user's favourites, or removes it with favorite false. Setting the state a food already has changes nothing. A user holds at most 200 favourites. It logs nothing: to record that the user ate the food use log_food_entry; to read favourites use list_favorite_foods.
Input
| Field | Type | Description |
|---|---|---|
| id | string | A food, custom food or saved meal id from search_foods, list_recent_foods or list_favorite_foods. |
| favorite | boolean | true to add the food to the user's favourites, false to remove it. |
Full input schema, including bounds and nested alternatives (MCP)
{
"type": "object",
"properties": {
"id": {
"type": "string",
"description": "A food, custom food or saved meal id from search_foods, list_recent_foods or list_favorite_foods."
},
"favorite": {
"type": "boolean",
"description": "true to add the food to the user's favourites, false to remove it."
}
},
"required": [
"id",
"favorite"
],
"additionalProperties": true
}Output
| Field | Type | Description |
|---|---|---|
| food | object | |
| food.id | string | |
| food.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. |
| food.name | string | |
| food.brandNameoptional | string | |
| favorite | boolean | Whether the food is now a favourite. |
| changed | boolean | False when the food was already in the asked state. |
Full output schema
{
"type": "object",
"properties": {
"food": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"kind": {
"type": "string",
"enum": [
"food",
"custom_food",
"saved_meal"
],
"description": "food: the DailyGoal catalogue. custom_food: a food the user created. saved_meal: a meal the user saved, logged as one entry."
},
"name": {
"type": "string"
},
"brandName": {
"type": "string"
}
},
"required": [
"id",
"kind",
"name"
],
"additionalProperties": true
},
"favorite": {
"type": "boolean",
"description": "Whether the food is now a favourite."
},
"changed": {
"type": "boolean",
"description": "False when the food was already in the asked state."
}
},
"required": [
"food",
"favorite",
"changed"
],
"additionalProperties": true
}Example request
curl -X PUT "https://api.dailygoal.fit/v1/favorite-foods" \
-H "Authorization: Bearer $DAILYGOAL_API_TOKEN" \
-H "Content-Type: application/json" \
-d '{"id":"j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a","favorite":true}'{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "set_favorite_food",
"arguments": {
"id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
"favorite": true
}
}
}Example response
Synthetic data. REST returns this object as the body; MCP returns it as structuredContent.
{
"food": {
"id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
"kind": "food",
"name": "Rolled oats"
},
"favorite": true,
"changed": true
}Errors
unauthorized(401)origin_not_allowed(403)misdirected_request(421)subscription_required(403)rate_limited(429)validation_failed(400)not_found(404)conflict(409)limit_exceeded(409)internal_error(500)