Food Search reference

Search the food catalogue, custom foods and saved meals for the ids that log_food_entry needs.

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

Operations

search_foods

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

MCP tool search_foods · Read-only

Search the DailyGoal food catalogue, the user's custom foods and their saved meals, optionally filtered by kind. Returns the ids and per-serving nutrition that log_food_entry needs. It does not return what the user ate; use list_food_entries for that.

Input

FieldTypeDescription
queryoptionalstringFood name, optionally with a brand. Required unless kind is custom_food or saved_meal, which then lists the user's own items.
kindoptional"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.
limitoptionalintegerMost results to return. Default 20.

Output

FieldTypeDescription
foodsobject[]
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[].per100gobject
foods[].per100g.caloriesnumberkcal
foods[].per100g.proteinnumbergrams
foods[].per100g.carbsnumbergrams
foods[].per100g.fatnumbergrams
foods[].per100g.alcoholnumbergrams

Example request

REST
curl "https://api.dailygoal.fit/v1/foods?query=oats&limit=5" \
  -H "Authorization: Bearer $DAILYGOAL_API_TOKEN"
MCP tools/call
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "search_foods",
    "arguments": {
      "query": "oats",
      "limit": 5
    }
  }
}

Example response

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

json
{
  "foods": [
    {
      "id": "j57c2m8k4q1x9v3d6n0r5t7w2b8y4h1a",
      "kind": "food",
      "name": "Rolled oats",
      "serving": {
        "size": 40,
        "unit": "g",
        "text": "40 g"
      },
      "perServing": {
        "calories": 152,
        "protein": 5.3,
        "carbs": 27.1,
        "fat": 2.6,
        "alcohol": 0
      },
      "per100g": {
        "calories": 379,
        "protein": 13.2,
        "carbs": 67.7,
        "fat": 6.5,
        "alcohol": 0
      }
    },
    {
      "id": "j579h2c5m8q1x4v7n0r3t6w9b2y5k8dc",
      "kind": "saved_meal",
      "name": "Overnight oats with yoghurt and blueberries",
      "serving": {
        "size": 290,
        "unit": "g",
        "text": "1 bowl"
      },
      "perServing": {
        "calories": 319,
        "protein": 20.9,
        "carbs": 47.5,
        "fat": 5.9,
        "alcohol": 0
      },
      "per100g": {
        "calories": 110,
        "protein": 7.2,
        "carbs": 16.4,
        "fat": 2,
        "alcohol": 0
      }
    }
  ]
}

Errors