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 with a paid plan or during a free trial. See plans.

Operations

list_favorite_foods

GET https://api.dailygoal.fit/v1/favorite-foods

MCP tool list_favorite_foods · Read-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.

Output

FieldTypeDescription
foodsobject[]The user's favourite foods, custom foods and saved meals, by name. At most 200.
foods[].idstring
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[].namestring
foods[].brandNameoptionalstring
foods[].servingobject
foods[].serving.sizenumber
foods[].serving.unitstring
foods[].serving.textoptionalstring
foods[].perServingobject
foods[].perServing.caloriesnumberkcal
foods[].perServing.proteinnumbergrams
foods[].perServing.carbsnumbergrams
foods[].perServing.fatnumbergrams
foods[].perServing.alcoholnumbergrams
foods[].per100gobjectFoods: nutrition per 100 g/ml. Saved meals: stored whole-recipe nutrition; use perServing for logging.
foods[].per100g.caloriesnumberkcal
foods[].per100g.proteinnumbergrams
foods[].per100g.carbsnumbergrams
foods[].per100g.fatnumbergrams
foods[].per100g.alcoholnumbergrams

Example request

REST
curl "https://api.dailygoal.fit/v1/favorite-foods" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN"
MCP tools/call
{
  "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.

json
{
  "foods": [
    {
      "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
      }
    },
    {
      "id": "j579h2c5m8q1x4v7n0r3t6w9b2y5k8dc",
      "kind": "saved_meal",
      "name": "Overnight oats with yoghurt and blueberries",
      "serving": {
        "size": 290,
        "unit": "g",
        "text": "1 bowl"
      },
      "perServing": {
        "calories": 319,
        "protein": 20.9,
        "carbs": 47.5,
        "fat": 5.9,
        "alcohol": 0
      },
      "per100g": {
        "calories": 110,
        "protein": 7.2,
        "carbs": 16.4,
        "fat": 2,
        "alcohol": 0
      }
    }
  ]
}

Errors

set_favorite_food

PUT https://api.dailygoal.fit/v1/favorite-foods

MCP tool set_favorite_food · Changes data

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

FieldTypeDescription
idstringA food, custom food or saved meal id from search_foods, list_recent_foods or list_favorite_foods.
favoritebooleantrue to add the food to the user's favourites, false to remove it.

Output

FieldTypeDescription
foodobject
food.idstring
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.namestring
food.brandNameoptionalstring
favoritebooleanWhether the food is now a favourite.
changedbooleanFalse when the food was already in the asked state.

Example request

REST
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}'
MCP tools/call
{
  "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.

json
{
  "food": {
    "id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
    "kind": "food",
    "name": "Rolled oats"
  },
  "favorite": true,
  "changed": true
}

Errors