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

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.
saidNoThe amounts are checked against this: the user's own words for this meal, verbatim (e.g. 'a pint of IPA and wings at the bar'). Only the meal description — not other parts of the conversation. Optional; without it, the amounts are logged as sent.
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

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

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / said / description
      Previous value: -"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."New value: +"The amounts are checked against this: the user's own words for this meal, verbatim (e.g. 'a pint of IPA and wings at the bar'). Only the meal description — not other parts of the conversation. Optional; without it, the amounts are logged as sent."
  2. 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"
      +}
  3. 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"
      +}
  4. 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."
  5. 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"
      +}
  6. 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."
  7. 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."
  8. Added

TDQS

A4.6/5.0
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare the mutation profile (readOnly=false, destructive=true, idempotent=true), and the description adds substantial non-obvious behavior: partial-update merge semantics, no history kept, the quantity-rescaling rule with the '150 g to 300 g doubles' example and its fallback, and the immutability of the entry's date. That is exactly the extra context annotations cannot carry.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded with the core purpose and edit surface, then layered with the rescaling rule and the estimate disclaimer. It is dense and earns most of its length, though the closing medical disclaimer is lengthy relative to the tool's edit function.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For an 11-parameter mutation tool with nested macros, the description covers identity (id/local_date/item_index), merge semantics, the rescaling edge case, and the accuracy caveat. An output schema exists, so return-value explanation is not needed, leaving no material gap.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100% so the baseline is 3, but the description goes beyond the schema by explaining cross-parameter interactions: quantity without macros rescales macros/caffeine/fluid, and `said` is the verbatim user wording that amounts are validated against. It does not explain every parameter (e.g. `note` replacement scope is left to the schema).

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description opens with a specific verb+resource ('Correct a food already in the user's diary') and enumerates exactly what is editable (name, quantity, macros, caffeine, fluid, meal label, note). This clearly separates it from siblings like log_meal and delete_meal.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It states when to use the tool and the key routing rule between entry-level vs food-level edits ('Required when changing a food's name/quantity/macros/caffeine/fluid; omit for an entry-level change'), plus the constraint that an entry cannot be moved to another day. It never names an alternative sibling such as log_meal or delete_meal, so it falls short of a 5.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.