Skip to main content
Glama

update_meal

DestructiveIdempotent

Correct a food already in the user's diary — its name, quantity, macros, caffeine or fluid — or change an entry's meal label or note. The entry is identified by id and local_date, and a food by its item_index. Only the fields sent change; macros are merged onto the existing values and overwritten in place, with no history kept. A new quantity sent without macros rescales the food's macros, caffeine and fluid by the new amount ÷ the old one when both are the same kind of amount (a weight, a volume or a count), so '150 g' to '300 g' doubles them; otherwise the macros stay as they were and the reply says so. An entry cannot be moved to another day. All calorie and macro values, including carbohydrates, are estimates from USDA FoodData Central, Open Food Facts, the user's own entry or an AI assistant's estimate — approximate, not lab-measured or specific to a package or batch, and not suitable for insulin dosing (including carb counting for a meal bolus), blood-glucose prediction or any other medical decision.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe entry id, shown with each entry in the reply text when a meal is logged or a day or range is read.
mealNoMove the entry to a different meal label.
nameNoCorrected name of the food.
noteNoReplacement note for the entry.
saidNoOptional. The user's own words describing this meal, verbatim (e.g. 'a pint of IPA and wings at the bar'). Only the meal description — not other parts of the conversation.
macrosNoCorrected macros. Only the components included are changed.
fluid_mlNoCorrected fluid/hydration volume, in millilitres.
quantityNoPortion as stated, e.g. '2' or '1 cup'.
item_indexNoWhich food in the entry's items[] to edit (0-based). Required when changing a food's name/quantity/macros/caffeine/fluid; omit for an entry-level change (meal/note).
local_dateYesYYYY-MM-DD diary date of the entry.
caffeine_mgNoCorrected caffeine content, in milligrams.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
entryYesOne diary entry: a meal with its foods.
day_totalsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedInput schema / properties / said
      Added value: +{
      +  "description": "Optional. The user's own words describing this meal, verbatim (e.g. 'a pint of IPA and wings at the bar'). Only the meal description — not other parts of the conversation.",
      +  "maxLength": 300,
      +  "type": "string"
      +}
  2. Changed4 schema fields changed
    • removedOutput schema / properties / entry / properties / created_at
      Removed value: -{
      -  "type": "string"
      -}
    • addedOutput schema / properties / entry / properties / id / description
      Added value: +"Identifies the entry for a later edit or deletion."
    • removedOutput schema / properties / entry / properties / items / items / properties / source
      Removed value: -{
      -  "description": "Where the macros came from (e.g. usda, off, client).",
      -  "type": "string"
      -}
    • addedOutput schema / properties / entry / properties / items / items / properties / unknown_macros
      Added value: +{
      +  "description": "Macros missing from the source data: shown as 0 but unknown, not a real zero.",
      +  "items": {
      +    "enum": [
      +      "protein_g",
      +      "carb_g",
      +      "fat_g"
      +    ],
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
  3. Changed1 schema field changed
    • changedInput schema / properties / id / description
      Previous value: -"The entry id, as returned when reading a day."New value: +"The entry id, shown with each entry in the reply text when a meal is logged or a day or range is read."
  4. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "day_totals": {
      +      "properties": {
      +        "caffeine_mg": {
      +          "type": "number"
      +        },
      +        "entry_count": {
      +          "type": "integer"
      +        },
      +        "fluid_ml": {
      +          "type": "number"
      +        },
      +        "local_date": {
      +          "description": "A local date, YYYY-MM-DD.",
      +          "type": "string"
      +        },
      +        "totals": {
      +          "description": "Calories and macros. Estimates, not lab-measured; not for insulin dosing.",
      +          "properties": {
      +            "carb_g": {
      +              "type": "number"
      +            },
      +            "fat_g": {
      +              "type": "number"
      +            },
      +            "kcal": {
      +              "type": "number"
      +            },
      +            "protein_g": {
      +              "type": "number"
      +            }
      +          },
      +          "required": [
      +            "kcal",
      +            "protein_g",
      +            "carb_g",
      +            "fat_g"
      +          ],
      +          "type": "object"
      +        }
      +      },
      +      "required": [
      +        "local_date",
      +        "entry_count",
      +        "totals"
      +      ],
      +      "type": "object"
      +    },
      +    "entry": {
      +      "description": "One diary entry: a meal with its foods.",
      +      "properties": {
      +        "at": {
      +          "description": "ISO-8601 UTC instant the food was eaten.",
      +          "type": "string"
      +        },
      +        "created_at": {
      +          "type": "string"
      +        },
      +        "id": {
      +          "type": "string"
      +        },
      +        "items": {
      +          "items": {
      +            "properties": {
      +              "caffeine_mg": {
      +                "type": "number"
      +              },
      +              "fluid_ml": {
      +                "type": "number"
      +              },
      +              "macros": {
      +                "description": "Calories and macros. Estimates, not lab-measured; not for insulin dosing.",
      +                "properties": {
      +                  "carb_g": {
      +                    "type": "number"
      +                  },
      +                  "fat_g": {
      +                    "type": "number"
      +                  },
      +                  "kcal": {
      +                    "type": "number"
      +                  },
      +                  "protein_g": {
      +                    "type": "number"
      +                  }
      +                },
      +                "required": [],
      +                "type": "object"
      +              },
      +              "name": {
      +                "type": "string"
      +              },
      +              "quantity": {
      +                "type": "string"
      +              },
      +              "source": {
      +                "description": "Where the macros came from (e.g. usda, off, client).",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "name"
      +            ],
      +            "type": "object"
      +          },
      +          "type": "array"
      +        },
      +        "local_date": {
      +          "description": "A local date, YYYY-MM-DD.",
      +          "type": "string"
      +        },
      +        "meal": {
      +          "description": "breakfast, lunch, dinner or snack, when set.",
      +          "type": "string"
      +        },
      +        "note": {
      +          "type": "string"
      +        }
      +      },
      +      "required": [
      +        "id",
      +        "at",
      +        "local_date",
      +        "items"
      +      ],
      +      "type": "object"
      +    }
      +  },
      +  "required": [
      +    "entry",
      +    "day_totals"
      +  ],
      +  "type": "object"
      +}
  5. Changed7 schema fields changed
    • changedInput schema / properties / macros / description
      Previous value: -"Corrected macros — only the components you send are changed."New value: +"Corrected macros. Only the components included are changed."
    • addedInput schema / properties / macros / properties / carb_g / description
      Added value: +"Corrected total carbohydrate for the whole portion, in grams."
    • addedInput schema / properties / macros / properties / fat_g / description
      Added value: +"Corrected total fat for the whole portion, in grams."
    • addedInput schema / properties / macros / properties / kcal / description
      Added value: +"Corrected energy for the whole portion, in kilocalories."
    • addedInput schema / properties / macros / properties / protein_g / description
      Added value: +"Corrected protein for the whole portion, in grams."
    • addedInput schema / properties / name / description
      Added value: +"Corrected name of the food."
    • addedInput schema / properties / note / description
      Added value: +"Replacement note for the entry."
  6. Changed2 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"The entry id to edit (from get_day)."New value: +"The entry id, as returned when reading a day."
    • changedInput schema / properties / local_date / description
      Previous value: -"YYYY-MM-DD diary date of the entry (from get_day)."New value: +"YYYY-MM-DD diary date of the entry."
  7. Added

TDQS

Score is being calculated.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.