Recent Foods reference

List the foods the user logged most recently, with the ids log_food_entry takes.

The DailyGoal API is not available on the Free plan. It works while Pro is active, including during an introductory offer. See plans.

Usage notes

Returns up to 30 recently logged library items. Use their ids to log a new food entry.

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_recent_foods

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

MCP tool list_recent_foods · Read-only · DailyGoal data only

Lists up to 30 foods, custom foods and saved meals the user logged most recently, newest first, with when each was last logged, whether it is a favourite, and the ids log_food_entry takes. Use it to log something the user eats often. For the diary itself use list_food_entries; for favourites use list_favorite_foods.

Input

This operation takes no input.

Full input schema, including bounds and nested alternatives (MCP)
JSON Schema
{
  "type": "object",
  "properties": {}
}

Output

FieldTypeDescription
foodsobject[]The foods the user logged most recently, newest first. At most 30.
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
foods[].isFavoriteboolean
foods[].lastUsedAtstringWhen the user last logged this food, as an ISO 8601 UTC timestamp.
Full output schema
JSON Schema
{
  "type": "object",
  "properties": {
    "foods": {
      "type": "array",
      "items": {
        "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"
          },
          "serving": {
            "type": "object",
            "properties": {
              "size": {
                "type": "number"
              },
              "unit": {
                "type": "string"
              },
              "text": {
                "type": "string"
              }
            },
            "required": [
              "size",
              "unit"
            ],
            "additionalProperties": true
          },
          "perServing": {
            "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
          },
          "per100g": {
            "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": "Foods: nutrition per 100 g/ml. Saved meals: stored whole-recipe nutrition; use perServing for logging."
          },
          "isFavorite": {
            "type": "boolean"
          },
          "lastUsedAt": {
            "type": "string",
            "description": "When the user last logged this food, as an ISO 8601 UTC timestamp."
          }
        },
        "required": [
          "id",
          "kind",
          "name",
          "serving",
          "perServing",
          "per100g",
          "isFavorite",
          "lastUsedAt"
        ],
        "additionalProperties": true
      },
      "description": "The foods the user logged most recently, newest first. At most 30."
    }
  },
  "required": [
    "foods"
  ],
  "additionalProperties": true
}

Example request

REST
curl "https://api.dailygoal.fit/v1/recent-foods" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN"
MCP tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "list_recent_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": 109.8,
        "protein": 14.9,
        "carbs": 5.9,
        "fat": 3,
        "alcohol": 0
      },
      "per100g": {
        "calories": 73.2,
        "protein": 9.9,
        "carbs": 3.9,
        "fat": 2,
        "alcohol": 0
      },
      "isFavorite": true,
      "lastUsedAt": "2026-09-14T15:10:00.000Z"
    },
    {
      "id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
      "kind": "food",
      "name": "Rolled oats",
      "serving": {
        "size": 40,
        "unit": "g",
        "text": "40 g"
      },
      "perServing": {
        "calories": 152.8,
        "protein": 5.3,
        "carbs": 27.1,
        "fat": 2.6,
        "alcohol": 0
      },
      "per100g": {
        "calories": 382.1,
        "protein": 13.2,
        "carbs": 67.7,
        "fat": 6.5,
        "alcohol": 0
      },
      "isFavorite": false,
      "lastUsedAt": "2026-09-14T07:42:00.000Z"
    }
  ]
}

Errors