Food Entries reference
List, log, update and delete what the user ate. A saved-meal serving adds the whole recipe's nutrition divided by its recipe servings.
The DailyGoal API is not available on the Free plan. It works with a paid plan or during a free trial. See plans.
Usage notes
With no dates, list_food_entries reads today. With only from or only to, both bounds use that date. Pass both dates for a range, then follow nextCursor while hasMore is true.
For a saved meal, servings 1 logs 1/servings of the whole recipe. Food diary writes also share the app's food-write limiter.
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_food_entries: List food entrieslog_food_entry: Log food entryupdate_food_entry: Update food entrydelete_food_entry: Delete food entry
list_food_entries
GET https://api.dailygoal.fit/v1/food-entries
MCP tool list_food_entries · Read-only · DailyGoal data 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
| Field | Type | Description |
|---|---|---|
| fromoptional | string (YYYY-MM-DD) | First Activity Day, YYYY-MM-DD. Defaults to to, or today if both dates are omitted. |
| tooptional | string (YYYY-MM-DD) | Last Activity Day, YYYY-MM-DD, inclusive. Defaults to from, or today if both dates are omitted. |
| limitoptional | integer | Most entries per page. Default 50. |
| cursoroptional | string | nextCursor from the previous page. Only valid with the same from and to. |
Full input schema, including bounds and nested alternatives (MCP)
{
"type": "object",
"properties": {
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "First Activity Day, YYYY-MM-DD. Defaults to to, or today if both dates are omitted."
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Last Activity Day, YYYY-MM-DD, inclusive. Defaults to from, or today if both dates are omitted."
},
"limit": {
"type": "integer",
"minimum": 1,
"maximum": 100,
"description": "Most entries per page. Default 50."
},
"cursor": {
"type": "string",
"description": "nextCursor from the previous page. Only valid with the same from and to."
}
},
"additionalProperties": true
}Output
| Field | Type | Description |
|---|---|---|
| entries | object[] | |
| entries[].id | string | |
| entries[].date | string (YYYY-MM-DD) | |
| entries[].mealType | "breakfast" | "lunch" | "dinner" | "snack" | |
| entries[].servings | number | |
| entries[].food | object | |
| entries[].food.id | string | |
| 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.name | string | |
| entries[].food.brandNameoptional | string | |
| entries[].nutrition | object | Totals for this entry's servings. |
| entries[].nutrition.calories | number | kcal |
| entries[].nutrition.protein | number | grams |
| entries[].nutrition.carbs | number | grams |
| entries[].nutrition.fat | number | grams |
| entries[].nutrition.alcohol | number | grams |
| from | string (YYYY-MM-DD) | |
| to | string (YYYY-MM-DD) | |
| timezone | string | IANA timezone that defines the Activity Day. |
| hasMore | boolean | True when more entries exist in the window. Pass nextCursor to get them. |
| nextCursor | string | null |
Full output schema
{
"type": "object",
"properties": {
"entries": {
"type": "array",
"items": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"mealType": {
"type": "string",
"enum": [
"breakfast",
"lunch",
"dinner",
"snack"
]
},
"servings": {
"type": "number"
},
"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
},
"nutrition": {
"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": "Totals for this entry's servings."
}
},
"required": [
"id",
"date",
"mealType",
"servings",
"food",
"nutrition"
],
"additionalProperties": true
}
},
"from": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"to": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"timezone": {
"type": "string",
"description": "IANA timezone that defines the Activity Day."
},
"hasMore": {
"type": "boolean",
"description": "True when more entries exist in the window. Pass nextCursor to get them."
},
"nextCursor": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
]
}
},
"required": [
"entries",
"from",
"to",
"timezone",
"hasMore",
"nextCursor"
],
"additionalProperties": true
}Example request
curl "https://api.dailygoal.fit/v1/food-entries?from=2026-09-14&to=2026-09-14&limit=50" \
-H "Authorization: Bearer $DAILYGOAL_API_TOKEN"{
"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.
{
"entries": [
{
"id": "kd7a1b4c7d0e3f6g9h2j5k8m1n4p7q0r",
"date": "2026-09-14",
"mealType": "breakfast",
"servings": 1,
"food": {
"id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
"kind": "food",
"name": "Rolled oats"
},
"nutrition": {
"calories": 152.8,
"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": 109.8,
"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
unauthorized(401)origin_not_allowed(403)misdirected_request(421)subscription_required(403)rate_limited(429)validation_failed(400)internal_error(500)
log_food_entry
POST https://api.dailygoal.fit/v1/food-entries
MCP tool log_food_entry · Changes data · DailyGoal data only · Accepts Idempotency-Key
Log what the user ate as a new food entry. Use an id from search_foods, list_recent_foods or list_favorite_foods. Match the result's kind: food uses only foodId, custom_food uses only customFoodId, and saved_meal uses only savedMealId. Remove the other two id properties from the arguments. For a saved meal, 1 serving logs 1/recipe-servings of its whole-recipe nutrition. When the user gives no amount, log 1 serving and tell them, since update_food_entry can change it. 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
| Field | Type | Description |
|---|---|---|
| foodIdoptional | string | A catalogue food id (kind food) from search_foods. |
| customFoodIdoptional | string | One of the user's custom food ids (kind custom_food) from search_foods. |
| savedMealIdoptional | string | One of the user's saved meal ids (kind saved_meal) from search_foods. |
| servings | number | Number of servings. For foods, one serving is serving.size in serving.unit. For saved meals, one serving is the whole recipe divided by its recipe servings (1 of 4 logs one quarter). |
| mealType | "breakfast" | "lunch" | "dinner" | "snack" | |
| dateoptional | string (YYYY-MM-DD) | Activity Day, YYYY-MM-DD. Defaults to today in the user's timezone. |
| idempotency_keyoptional | string | Optional. 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. |
Full input schema, including bounds and nested alternatives (MCP)
{
"type": "object",
"properties": {
"foodId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "A catalogue food id (kind food) from search_foods."
},
"customFoodId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "One of the user's custom food ids (kind custom_food) from search_foods."
},
"savedMealId": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "One of the user's saved meal ids (kind saved_meal) from search_foods."
},
"servings": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Number of servings. For foods, one serving is serving.size in serving.unit. For saved meals, one serving is the whole recipe divided by its recipe servings (1 of 4 logs one quarter)."
},
"mealType": {
"type": "string",
"enum": [
"breakfast",
"lunch",
"dinner",
"snack"
]
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Activity Day, YYYY-MM-DD. Defaults to today in the user's timezone."
},
"idempotency_key": {
"type": "string",
"maxLength": 255,
"description": "Optional. 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."
}
},
"required": [
"servings",
"mealType"
],
"additionalProperties": true
}Output
| Field | Type | Description |
|---|---|---|
| entry | object | |
| entry.id | string | |
| entry.date | string (YYYY-MM-DD) | |
| entry.mealType | "breakfast" | "lunch" | "dinner" | "snack" | |
| entry.servings | number | |
| entry.food | object | |
| entry.food.id | string | |
| 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.name | string | |
| entry.food.brandNameoptional | string | |
| entry.nutrition | object | Totals for this entry's servings. |
| entry.nutrition.calories | number | kcal |
| entry.nutrition.protein | number | grams |
| entry.nutrition.carbs | number | grams |
| entry.nutrition.fat | number | grams |
| entry.nutrition.alcohol | number | grams |
| date | string (YYYY-MM-DD) | The Activity Day the entry is on. |
| timezone | string | IANA timezone that defines the Activity Day. |
Full output schema
{
"type": "object",
"properties": {
"entry": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"mealType": {
"type": "string",
"enum": [
"breakfast",
"lunch",
"dinner",
"snack"
]
},
"servings": {
"type": "number"
},
"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
},
"nutrition": {
"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": "Totals for this entry's servings."
}
},
"required": [
"id",
"date",
"mealType",
"servings",
"food",
"nutrition"
],
"additionalProperties": true
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "The Activity Day the entry is on."
},
"timezone": {
"type": "string",
"description": "IANA timezone that defines the Activity Day."
}
},
"required": [
"entry",
"date",
"timezone"
],
"additionalProperties": true
}Example request
The REST example uses OpenSSL to generate a fresh key for a new create. To retry that create, rerun only the curl command with the same key and input. You may send that key as idempotency_key in the MCP arguments too.
DAILYGOAL_IDEMPOTENCY_KEY="$(openssl rand -hex 16)"
curl -X POST "https://api.dailygoal.fit/v1/food-entries" \
-H "Authorization: Bearer $DAILYGOAL_API_TOKEN" \
-H "Idempotency-Key: $DAILYGOAL_IDEMPOTENCY_KEY" \
-H "Content-Type: application/json" \
-d '{"customFoodId":"j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca","servings":1,"mealType":"snack","date":"2026-09-14"}'{
"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.
{
"entry": {
"id": "kd7b2c5d8e1f4g7h0j3k6m9n2p5q8r1s",
"date": "2026-09-14",
"mealType": "snack",
"servings": 1,
"food": {
"id": "j572k9d3m6q8x1v4n7r0t2w5b8y3h6ca",
"kind": "custom_food",
"name": "Greek yoghurt 2%"
},
"nutrition": {
"calories": 109.8,
"protein": 14.9,
"carbs": 5.9,
"fat": 3,
"alcohol": 0
}
},
"date": "2026-09-14",
"timezone": "Europe/London"
}Errors
unauthorized(401)origin_not_allowed(403)misdirected_request(421)subscription_required(403)rate_limited(429)validation_failed(400)not_found(404)idempotency_conflict(409)internal_error(500)
update_food_entry
PATCH https://api.dailygoal.fit/v1/food-entries
MCP tool update_food_entry · Changes data · Destructive · DailyGoal data only
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
| Field | Type | Description |
|---|---|---|
| id | string | Food entry id from list_food_entries or log_food_entry. |
| servingsoptional | number | Number of servings. For foods, one serving is serving.size in serving.unit. For saved meals, one serving is the whole recipe divided by its recipe servings (1 of 4 logs one quarter). |
| mealTypeoptional | "breakfast" | "lunch" | "dinner" | "snack" | |
| dateoptional | string (YYYY-MM-DD) | Move the entry to this Activity Day, YYYY-MM-DD. |
Full input schema, including bounds and nested alternatives (MCP)
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Food entry id from list_food_entries or log_food_entry."
},
"servings": {
"type": "number",
"exclusiveMinimum": 0,
"description": "Number of servings. For foods, one serving is serving.size in serving.unit. For saved meals, one serving is the whole recipe divided by its recipe servings (1 of 4 logs one quarter)."
},
"mealType": {
"type": "string",
"enum": [
"breakfast",
"lunch",
"dinner",
"snack"
]
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "Move the entry to this Activity Day, YYYY-MM-DD."
}
},
"required": [
"id"
],
"additionalProperties": true
}Output
| Field | Type | Description |
|---|---|---|
| entry | object | |
| entry.id | string | |
| entry.date | string (YYYY-MM-DD) | |
| entry.mealType | "breakfast" | "lunch" | "dinner" | "snack" | |
| entry.servings | number | |
| entry.food | object | |
| entry.food.id | string | |
| 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.name | string | |
| entry.food.brandNameoptional | string | |
| entry.nutrition | object | Totals for this entry's servings. |
| entry.nutrition.calories | number | kcal |
| entry.nutrition.protein | number | grams |
| entry.nutrition.carbs | number | grams |
| entry.nutrition.fat | number | grams |
| entry.nutrition.alcohol | number | grams |
| date | string (YYYY-MM-DD) | The Activity Day the entry is on. |
| timezone | string | IANA timezone that defines the Activity Day. |
Full output schema
{
"type": "object",
"properties": {
"entry": {
"type": "object",
"properties": {
"id": {
"type": "string"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"mealType": {
"type": "string",
"enum": [
"breakfast",
"lunch",
"dinner",
"snack"
]
},
"servings": {
"type": "number"
},
"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
},
"nutrition": {
"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": "Totals for this entry's servings."
}
},
"required": [
"id",
"date",
"mealType",
"servings",
"food",
"nutrition"
],
"additionalProperties": true
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$",
"description": "The Activity Day the entry is on."
},
"timezone": {
"type": "string",
"description": "IANA timezone that defines the Activity Day."
}
},
"required": [
"entry",
"date",
"timezone"
],
"additionalProperties": true
}Example request
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}'{
"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.
{
"entry": {
"id": "kd7a1b4c7d0e3f6g9h2j5k8m1n4p7q0r",
"date": "2026-09-14",
"mealType": "breakfast",
"servings": 1.5,
"food": {
"id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
"kind": "food",
"name": "Rolled oats"
},
"nutrition": {
"calories": 229.3,
"protein": 7.9,
"carbs": 40.6,
"fat": 3.9,
"alcohol": 0
}
},
"date": "2026-09-14",
"timezone": "Europe/London"
}Errors
unauthorized(401)origin_not_allowed(403)misdirected_request(421)subscription_required(403)rate_limited(429)validation_failed(400)not_found(404)internal_error(500)
delete_food_entry
DELETE https://api.dailygoal.fit/v1/food-entries
MCP tool delete_food_entry · Changes data · Destructive · DailyGoal data only
Delete one logged food entry by id. It leaves the food itself alone; to delete a custom food, use delete_custom_food.
Input
| Field | Type | Description |
|---|---|---|
| id | string | Food entry id from list_food_entries or log_food_entry. |
Full input schema, including bounds and nested alternatives (MCP)
{
"type": "object",
"properties": {
"id": {
"type": "string",
"minLength": 1,
"maxLength": 128,
"description": "Food entry id from list_food_entries or log_food_entry."
}
},
"required": [
"id"
],
"additionalProperties": true
}Output
| Field | Type | Description |
|---|---|---|
| id | string | |
| date | string (YYYY-MM-DD) | |
| timezone | string | IANA timezone that defines the Activity Day. |
Full output schema
{
"type": "object",
"properties": {
"id": {
"type": "string"
},
"date": {
"type": "string",
"pattern": "^\\d{4}-\\d{2}-\\d{2}$"
},
"timezone": {
"type": "string",
"description": "IANA timezone that defines the Activity Day."
}
},
"required": [
"id",
"date",
"timezone"
],
"additionalProperties": true
}Example request
curl -X DELETE "https://api.dailygoal.fit/v1/food-entries?id=kd7b2c5d8e1f4g7h0j3k6m9n2p5q8r1s" \
-H "Authorization: Bearer $DAILYGOAL_API_TOKEN"{
"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.
{
"id": "kd7b2c5d8e1f4g7h0j3k6m9n2p5q8r1s",
"date": "2026-09-14",
"timezone": "Europe/London"
}Errors
unauthorized(401)origin_not_allowed(403)misdirected_request(421)subscription_required(403)rate_limited(429)validation_failed(400)not_found(404)internal_error(500)