Food Entries reference

List, log, update and delete what the user ate, with nutrition totals for each entry.

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_food_entries

GET https://api.dailygoal.fit/v1/food-entries

MCP tool list_food_entries · Read-only

List the food entries the user logged between two Activity Days, oldest first, in pages. To find a food to log, use search_foods instead.

Input

FieldTypeDescription
fromoptionalstring (YYYY-MM-DD)First Activity Day, YYYY-MM-DD. Defaults to today.
tooptionalstring (YYYY-MM-DD)Last Activity Day, YYYY-MM-DD, inclusive. Defaults to today.
limitoptionalintegerMost entries per page. Default 50.
cursoroptionalstringnextCursor from the previous page. Only valid with the same from and to.

Output

FieldTypeDescription
entriesobject[]
entries[].idstring
entries[].datestring (YYYY-MM-DD)
entries[].mealType"breakfast" | "lunch" | "dinner" | "snack"
entries[].servingsnumber
entries[].foodobject
entries[].food.idstring
entries[].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.
entries[].food.namestring
entries[].food.brandNameoptionalstring
entries[].nutritionobjectTotals for this entry's servings.
entries[].nutrition.caloriesnumberkcal
entries[].nutrition.proteinnumbergrams
entries[].nutrition.carbsnumbergrams
entries[].nutrition.fatnumbergrams
entries[].nutrition.alcoholnumbergrams
fromstring (YYYY-MM-DD)
tostring (YYYY-MM-DD)
timezonestringIANA timezone that defines the Activity Day.
hasMorebooleanTrue when more entries exist in the window. Pass nextCursor to get them.
nextCursorstring | null

Example request

REST
curl "https://api.dailygoal.fit/v1/food-entries?from=2026-09-14&to=2026-09-14&limit=50" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN"
MCP tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_food_entries",
    "arguments": {
      "from": "2026-09-14",
      "to": "2026-09-14",
      "limit": 50
    }
  }
}

Example response

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

json
{
  "entries": [
    {
      "id": "kd7a1b4c7d0e3f6g9h2j5k8m1n4p7q0r",
      "date": "2026-09-14",
      "mealType": "breakfast",
      "servings": 1,
      "food": {
        "id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
        "kind": "food",
        "name": "Rolled oats"
      },
      "nutrition": {
        "calories": 152,
        "protein": 5.3,
        "carbs": 27.1,
        "fat": 2.6,
        "alcohol": 0
      }
    },
    {
      "id": "kd7b2c5d8e1f4g7h0j3k6m9n2p5q8r1s",
      "date": "2026-09-14",
      "mealType": "snack",
      "servings": 1,
      "food": {
        "id": "j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca",
        "kind": "custom_food",
        "name": "Greek yoghurt 2%"
      },
      "nutrition": {
        "calories": 110,
        "protein": 14.9,
        "carbs": 5.9,
        "fat": 3,
        "alcohol": 0
      }
    }
  ],
  "from": "2026-09-14",
  "to": "2026-09-14",
  "timezone": "Europe/London",
  "hasMore": false,
  "nextCursor": null
}

Errors

log_food_entry

POST https://api.dailygoal.fit/v1/food-entries

MCP tool log_food_entry · Changes data · Accepts Idempotency-Key

Log what the user ate as a new food entry. Pass exactly one of foodId, customFoodId or savedMealId, using an id from search_foods. It always creates a separate entry; to change an existing entry use update_food_entry. To add a food the catalogue lacks, use save_custom_food first.

Input

FieldTypeDescription
foodIdoptionalstringA catalogue food id (kind food) from search_foods.
customFoodIdoptionalstringOne of the user's custom food ids (kind custom_food) from search_foods.
savedMealIdoptionalstringOne of the user's saved meal ids (kind saved_meal) from search_foods.
servingsnumberNumber of servings. One serving is the food's serving.size in serving.unit.
mealType"breakfast" | "lunch" | "dinner" | "snack"
dateoptionalstring (YYYY-MM-DD)Activity Day, YYYY-MM-DD. Defaults to today in the user's timezone.
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
entryobject
entry.idstring
entry.datestring (YYYY-MM-DD)
entry.mealType"breakfast" | "lunch" | "dinner" | "snack"
entry.servingsnumber
entry.foodobject
entry.food.idstring
entry.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.
entry.food.namestring
entry.food.brandNameoptionalstring
entry.nutritionobjectTotals for this entry's servings.
entry.nutrition.caloriesnumberkcal
entry.nutrition.proteinnumbergrams
entry.nutrition.carbsnumbergrams
entry.nutrition.fatnumbergrams
entry.nutrition.alcoholnumbergrams
datestring (YYYY-MM-DD)The Activity Day the entry is on.
timezonestringIANA timezone that defines the Activity Day.

Example request

REST
curl -X POST "https://api.dailygoal.fit/v1/food-entries" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN" \
  -H "Idempotency-Key: 3f1c9a52-7d4e-4b8a-9e21-5c6d7e8f9a01" \
  -H "Content-Type: application/json" \
  -d '{"customFoodId":"j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca","servings":1,"mealType":"snack","date":"2026-09-14"}'
MCP tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "log_food_entry",
    "arguments": {
      "customFoodId": "j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca",
      "servings": 1,
      "mealType": "snack",
      "date": "2026-09-14"
    }
  }
}

Example response

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

json
{
  "entry": {
    "id": "kd7b2c5d8e1f4g7h0j3k6m9n2p5q8r1s",
    "date": "2026-09-14",
    "mealType": "snack",
    "servings": 1,
    "food": {
      "id": "j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca",
      "kind": "custom_food",
      "name": "Greek yoghurt 2%"
    },
    "nutrition": {
      "calories": 110,
      "protein": 14.9,
      "carbs": 5.9,
      "fat": 3,
      "alcohol": 0
    }
  },
  "date": "2026-09-14",
  "timezone": "Europe/London"
}

Errors

update_food_entry

PATCH https://api.dailygoal.fit/v1/food-entries

MCP tool update_food_entry · Changes data · Destructive

Change the servings, meal type or date of one existing food entry. Omitted fields keep their value. To record something newly eaten, use log_food_entry instead.

Input

FieldTypeDescription
idstringFood entry id from list_food_entries or log_food_entry.
servingsoptionalnumberNumber of servings. One serving is the food's serving.size in serving.unit.
mealTypeoptional"breakfast" | "lunch" | "dinner" | "snack"
dateoptionalstring (YYYY-MM-DD)Move the entry to this Activity Day, YYYY-MM-DD.

Output

FieldTypeDescription
entryobject
entry.idstring
entry.datestring (YYYY-MM-DD)
entry.mealType"breakfast" | "lunch" | "dinner" | "snack"
entry.servingsnumber
entry.foodobject
entry.food.idstring
entry.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.
entry.food.namestring
entry.food.brandNameoptionalstring
entry.nutritionobjectTotals for this entry's servings.
entry.nutrition.caloriesnumberkcal
entry.nutrition.proteinnumbergrams
entry.nutrition.carbsnumbergrams
entry.nutrition.fatnumbergrams
entry.nutrition.alcoholnumbergrams
datestring (YYYY-MM-DD)The Activity Day the entry is on.
timezonestringIANA timezone that defines the Activity Day.

Example request

REST
curl -X PATCH "https://api.dailygoal.fit/v1/food-entries" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"id":"kd7a1b4c7d0e3f6g9h2j5k8m1n4p7q0r","servings":1.5}'
MCP tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "update_food_entry",
    "arguments": {
      "id": "kd7a1b4c7d0e3f6g9h2j5k8m1n4p7q0r",
      "servings": 1.5
    }
  }
}

Example response

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

json
{
  "entry": {
    "id": "kd7a1b4c7d0e3f6g9h2j5k8m1n4p7q0r",
    "date": "2026-09-14",
    "mealType": "breakfast",
    "servings": 1.5,
    "food": {
      "id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
      "kind": "food",
      "name": "Rolled oats"
    },
    "nutrition": {
      "calories": 228,
      "protein": 8,
      "carbs": 40.6,
      "fat": 3.9,
      "alcohol": 0
    }
  },
  "date": "2026-09-14",
  "timezone": "Europe/London"
}

Errors

delete_food_entry

DELETE https://api.dailygoal.fit/v1/food-entries

MCP tool delete_food_entry · Changes data · Destructive

Delete one logged food entry by id. It leaves the food itself alone; to delete a custom food, use delete_custom_food.

Input

FieldTypeDescription
idstringFood entry id from list_food_entries or log_food_entry.

Output

FieldTypeDescription
idstring
datestring (YYYY-MM-DD)
timezonestringIANA timezone that defines the Activity Day.

Example request

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

Example response

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

json
{
  "id": "kd7b2c5d8e1f4g7h0j3k6m9n2p5q8r1s",
  "date": "2026-09-14",
  "timezone": "Europe/London"
}

Errors