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

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

FieldTypeDescription
fromoptionalstring (YYYY-MM-DD)First Activity Day, YYYY-MM-DD. Defaults to to, or today if both dates are omitted.
tooptionalstring (YYYY-MM-DD)Last Activity Day, YYYY-MM-DD, inclusive. Defaults to from, or today if both dates are omitted.
limitoptionalintegerMost entries per page. Default 50.
cursoroptionalstringnextCursor from the previous page. Only valid with the same from and to.
Full input schema, including bounds and nested alternatives (MCP)
JSON Schema
{
  "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

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
Full output schema
JSON 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

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.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

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

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. 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"
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.
Full input schema, including bounds and nested alternatives (MCP)
JSON Schema
{
  "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

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.
Full output schema
JSON 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.

REST
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"}'
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": 109.8,
      "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 · 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

FieldTypeDescription
idstringFood entry id from list_food_entries or log_food_entry.
servingsoptionalnumberNumber 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"
dateoptionalstring (YYYY-MM-DD)Move the entry to this Activity Day, YYYY-MM-DD.
Full input schema, including bounds and nested alternatives (MCP)
JSON Schema
{
  "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

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.
Full output schema
JSON 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

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": 229.3,
      "protein": 7.9,
      "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 · 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

FieldTypeDescription
idstringFood entry id from list_food_entries or log_food_entry.
Full input schema, including bounds and nested alternatives (MCP)
JSON Schema
{
  "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

FieldTypeDescription
idstring
datestring (YYYY-MM-DD)
timezonestringIANA timezone that defines the Activity Day.
Full output schema
JSON 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

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