Saved Meals reference

Read, create, update and delete whole recipes with their ingredients and serving yield. Nutrition is for the whole recipe; log one serving to add one share.

The DailyGoal API is not available on the Free plan. It works with a paid plan or during a free trial. See plans.

Operations

get_saved_meal

GET https://api.dailygoal.fit/v1/saved-meals

MCP tool get_saved_meal · Read-only

Get one of the user's saved meals with its ingredients, servings, details and nutrition. Find the id with search_foods and kind saved_meal. To change the meal use save_saved_meal; to record that the user ate it use log_food_entry.

Input

FieldTypeDescription
idstringA saved meal id from search_foods with kind saved_meal, or from save_saved_meal.

Output

FieldTypeDescription
idstringSaved meal id. Pass it to log_food_entry as savedMealId.
namestring
descriptionoptionalstring
categoryoptional"breakfast" | "lunch" | "dinner" | "snack" | "recipe"Where the app files the meal. recipe is the app's default.
servingsnumberHow many servings the recipe makes, as shown in the app.
prepTimeMinutesoptionalnumber
cookTimeMinutesoptionalnumber
difficultyoptionalnumber
nutritionobjectTotals for the whole recipe. log_food_entry with savedMealId and servings 1 logs these totals divided by the recipe's servings. search_foods returns that per-serving nutrition.
nutrition.caloriesnumberkcal
nutrition.proteinnumbergrams
nutrition.carbsnumbergrams
nutrition.fatnumbergrams
nutrition.alcoholnumbergrams
ingredientsobject[]
ingredients[].foodobject
ingredients[].food.idstring
ingredients[].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.
ingredients[].food.namestring
ingredients[].food.brandNameoptionalstring
ingredients[].servingsnumber
ingredients[].nutritionobjectThis ingredient's share of the recipe.
ingredients[].nutrition.caloriesnumberkcal
ingredients[].nutrition.proteinnumbergrams
ingredients[].nutrition.carbsnumbergrams
ingredients[].nutrition.fatnumbergrams
ingredients[].nutrition.alcoholnumbergrams

Example request

REST
curl "https://api.dailygoal.fit/v1/saved-meals?id=j579h2c5m8q1x4v7n0r3t6w9b2y5k8dc" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN"
MCP tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_saved_meal",
    "arguments": {
      "id": "j579h2c5m8q1x4v7n0r3t6w9b2y5k8dc"
    }
  }
}

Example response

Synthetic data. REST returns this object as the body; MCP returns it as structuredContent.

json
{
  "id": "j579h2c5m8q1x4v7n0r3t6w9b2y5k8dc",
  "name": "Overnight oats with yoghurt and blueberries",
  "description": "Soak the oats in the yoghurt overnight, then top with blueberries.",
  "category": "breakfast",
  "servings": 1,
  "prepTimeMinutes": 5,
  "difficulty": 1,
  "nutrition": {
    "calories": 319,
    "protein": 20.9,
    "carbs": 47.5,
    "fat": 5.9,
    "alcohol": 0
  },
  "ingredients": [
    {
      "food": {
        "id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
        "kind": "food",
        "name": "Rolled oats"
      },
      "servings": 1,
      "nutrition": {
        "calories": 152,
        "protein": 5.3,
        "carbs": 27.1,
        "fat": 2.6,
        "alcohol": 0
      }
    },
    {
      "food": {
        "id": "j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca",
        "kind": "custom_food",
        "name": "Greek yoghurt 2%"
      },
      "servings": 1,
      "nutrition": {
        "calories": 110,
        "protein": 14.9,
        "carbs": 5.9,
        "fat": 3,
        "alcohol": 0
      }
    },
    {
      "food": {
        "id": "j574p8c1m3q6x9v2n5r8t1w4b7y0k3fe",
        "kind": "food",
        "name": "Blueberries"
      },
      "servings": 1,
      "nutrition": {
        "calories": 57,
        "protein": 0.7,
        "carbs": 14.5,
        "fat": 0.3,
        "alcohol": 0
      }
    }
  ]
}

Errors

save_saved_meal

POST https://api.dailygoal.fit/v1/saved-meals

MCP tool save_saved_meal · Changes data · Destructive · Accepts Idempotency-Key

Create a saved meal from foods and custom foods, or update one by passing its id. Replaces every field and the whole ingredient list, so read the meal with get_saved_meal before an update. Ingredients describe the whole recipe; servings is its yield. It records nothing eaten: call log_food_entry with the returned id as savedMealId and servings 1 to log one recipe serving. For a single food the catalogue lacks, use save_custom_food.

Input

FieldTypeDescription
idoptionalstringThe saved meal to update, from search_foods (kind saved_meal) or a previous save_saved_meal. Omit it to create a new saved meal.
namestringMeal name, for example 'Overnight oats'.
descriptionoptionalstringA short description. Blank or omitted means none.
categoryoptional"breakfast" | "lunch" | "dinner" | "snack" | "recipe"Where the app files the meal. recipe is the app's default.
servingsintegerHow many servings the whole recipe makes. Logging 1 serving adds 1/this number of the recipe's nutrition. At least 1.
prepTimeMinutesoptionalintegerPreparation time in minutes.
cookTimeMinutesoptionalintegerCooking time in minutes.
difficultyoptionalintegerHow hard the recipe is, from 1 (easy) to 5.
ingredientsobject[]The whole recipe's ingredients, from 1 to 100. An update replaces the list.
ingredients[].idstringA food or custom food id from search_foods (kind food or custom_food). Saved meals cannot be ingredients.
ingredients[].servingsnumberHow many of the food's servings go into the whole recipe, for example 2 for two 40 g servings of oats.
idempotency_keyoptionalstringOptional. A unique value for this create, for example a UUID. Retrying with the same key and arguments within 24 hours returns the first result instead of creating a duplicate.

Output

FieldTypeDescription
createdbooleanTrue when this call created the saved meal, false when it updated one.
savedMealobject
savedMeal.idstringSaved meal id. Pass it to log_food_entry as savedMealId.
savedMeal.namestring
savedMeal.descriptionoptionalstring
savedMeal.categoryoptional"breakfast" | "lunch" | "dinner" | "snack" | "recipe"Where the app files the meal. recipe is the app's default.
savedMeal.servingsnumberHow many servings the recipe makes, as shown in the app.
savedMeal.prepTimeMinutesoptionalnumber
savedMeal.cookTimeMinutesoptionalnumber
savedMeal.difficultyoptionalnumber
savedMeal.nutritionobjectTotals for the whole recipe. log_food_entry with savedMealId and servings 1 logs these totals divided by the recipe's servings. search_foods returns that per-serving nutrition.
savedMeal.nutrition.caloriesnumberkcal
savedMeal.nutrition.proteinnumbergrams
savedMeal.nutrition.carbsnumbergrams
savedMeal.nutrition.fatnumbergrams
savedMeal.nutrition.alcoholnumbergrams
savedMeal.ingredientsobject[]
savedMeal.ingredients[].foodobject
savedMeal.ingredients[].food.idstring
savedMeal.ingredients[].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.
savedMeal.ingredients[].food.namestring
savedMeal.ingredients[].food.brandNameoptionalstring
savedMeal.ingredients[].servingsnumber
savedMeal.ingredients[].nutritionobjectThis ingredient's share of the recipe.
savedMeal.ingredients[].nutrition.caloriesnumberkcal
savedMeal.ingredients[].nutrition.proteinnumbergrams
savedMeal.ingredients[].nutrition.carbsnumbergrams
savedMeal.ingredients[].nutrition.fatnumbergrams
savedMeal.ingredients[].nutrition.alcoholnumbergrams

Example request

REST
curl -X POST "https://api.dailygoal.fit/v1/saved-meals" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN" \
  -H "Idempotency-Key: 3f1c9a52-7d4e-4b8a-9e21-5c6d7e8f9a01" \
  -H "Content-Type: application/json" \
  -d '{"name":"Overnight oats with yoghurt and blueberries","description":"Soak the oats in the yoghurt overnight, then top with blueberries.","category":"breakfast","servings":1,"prepTimeMinutes":5,"difficulty":1,"ingredients":[{"id":"j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a","servings":1},{"id":"j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca","servings":1},{"id":"j574p8c1m3q6x9v2n5r8t1w4b7y0k3fe","servings":1}]}'
MCP tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "save_saved_meal",
    "arguments": {
      "name": "Overnight oats with yoghurt and blueberries",
      "description": "Soak the oats in the yoghurt overnight, then top with blueberries.",
      "category": "breakfast",
      "servings": 1,
      "prepTimeMinutes": 5,
      "difficulty": 1,
      "ingredients": [
        {
          "id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
          "servings": 1
        },
        {
          "id": "j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca",
          "servings": 1
        },
        {
          "id": "j574p8c1m3q6x9v2n5r8t1w4b7y0k3fe",
          "servings": 1
        }
      ]
    }
  }
}

Example response

Synthetic data. REST returns this object as the body; MCP returns it as structuredContent.

json
{
  "created": true,
  "savedMeal": {
    "id": "j579h2c5m8q1x4v7n0r3t6w9b2y5k8dc",
    "name": "Overnight oats with yoghurt and blueberries",
    "description": "Soak the oats in the yoghurt overnight, then top with blueberries.",
    "category": "breakfast",
    "servings": 1,
    "prepTimeMinutes": 5,
    "difficulty": 1,
    "nutrition": {
      "calories": 319,
      "protein": 20.9,
      "carbs": 47.5,
      "fat": 5.9,
      "alcohol": 0
    },
    "ingredients": [
      {
        "food": {
          "id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
          "kind": "food",
          "name": "Rolled oats"
        },
        "servings": 1,
        "nutrition": {
          "calories": 152,
          "protein": 5.3,
          "carbs": 27.1,
          "fat": 2.6,
          "alcohol": 0
        }
      },
      {
        "food": {
          "id": "j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca",
          "kind": "custom_food",
          "name": "Greek yoghurt 2%"
        },
        "servings": 1,
        "nutrition": {
          "calories": 110,
          "protein": 14.9,
          "carbs": 5.9,
          "fat": 3,
          "alcohol": 0
        }
      },
      {
        "food": {
          "id": "j574p8c1m3q6x9v2n5r8t1w4b7y0k3fe",
          "kind": "food",
          "name": "Blueberries"
        },
        "servings": 1,
        "nutrition": {
          "calories": 57,
          "protein": 0.7,
          "carbs": 14.5,
          "fat": 0.3,
          "alcohol": 0
        }
      }
    ]
  }
}

Errors

delete_saved_meal

DELETE https://api.dailygoal.fit/v1/saved-meals

MCP tool delete_saved_meal · Changes data · Destructive

Delete one of the user's saved meals from their library. Its ingredient foods stay. It fails with conflict while diary entries use the meal. To remove something the user logged, use delete_food_entry instead.

Input

FieldTypeDescription
idstringA saved meal id from search_foods with kind saved_meal, or from save_saved_meal.

Output

FieldTypeDescription
idstring
deletedtrue

Example request

REST
curl -X DELETE "https://api.dailygoal.fit/v1/saved-meals?id=j579h2c5m8q1x4v7n0r3t6w9b2y5k8dc" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN"
MCP tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "delete_saved_meal",
    "arguments": {
      "id": "j579h2c5m8q1x4v7n0r3t6w9b2y5k8dc"
    }
  }
}

Example response

Synthetic data. REST returns this object as the body; MCP returns it as structuredContent.

json
{
  "id": "j579h2c5m8q1x4v7n0r3t6w9b2y5k8dc",
  "deleted": true
}

Errors