Skip to main content
Glama

delete_meal

DestructiveIdempotent

Delete one food from a diary entry (by item_index), or the whole entry (without it). The entry is identified by id and local_date. Deletion is permanent, with no undo; deleting the last food removes the entry, and an id that matches no entry on that date returns a not-found error and deletes nothing. 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.
item_indexNoWhich food to remove (0-based). Omit to delete the whole entry.
local_dateYesYYYY-MM-DD diary date of the entry.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
entryYesWhat remains of the entry, or null.
removedYes
day_totalsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / properties / entry / anyOf
      Previous value: -[
      -  {
      -    "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"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "description": "One diary entry: a meal with its foods.",
      +    "properties": {
      +      "at": {
      +        "description": "ISO-8601 UTC instant the food was eaten.",
      +        "type": "string"
      +      },
      +      "id": {
      +        "description": "Identifies the entry for a later edit or deletion.",
      +        "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"
      +            },
      +            "unknown_macros": {
      +              "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"
      +            }
      +          },
      +          "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"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
  2. 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."
  3. 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": {
      +      "anyOf": [
      +        {
      +          "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"
      +        },
      +        {
      +          "type": "null"
      +        }
      +      ],
      +      "description": "What remains of the entry, or null."
      +    },
      +    "removed": {
      +      "type": "boolean"
      +    }
      +  },
      +  "required": [
      +    "removed",
      +    "entry",
      +    "day_totals"
      +  ],
      +  "type": "object"
      +}
  4. Changed2 schema fields changed
    • changedInput schema / properties / id / description
      Previous value: -"The entry id to delete from (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."
  5. Added

TDQS

A4.3/5.0
Behavior5/5

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

Despite annotations already carrying destructiveHint and idempotentHint, the description adds substantial unstated behavior: permanence with no undo, the cascade where deleting the last food removes the entry, and the fact that a non-matching `id` errors and deletes nothing. These are exactly the edge cases an agent needs before calling a destructive tool.

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

Conciseness3/5

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

The deletion semantics are front-loaded and efficient, but the trailing multi-clause disclaimer about calorie/macro estimates from USDA, Open Food Facts and AI estimates has no bearing on a delete operation and consumes roughly half the text. That is off-topic filler in an otherwise tight definition.

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?

With a rich annotation set and an output schema present, the description supplies everything still needed: scope selection, permanence, cascade-to-entry-removal, and error behavior. Nothing required to invoke this tool correctly is missing.

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

Parameters3/5

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

Schema description coverage is 100%, so `id`, `item_index` (0-based, omit to delete the whole entry) and `local_date` are already fully documented. The description restates the same semantics (item_index selects a food, omission targets the entry) without adding format or boundary details beyond the schema, so the baseline 3 applies.

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 first sentence states a specific verb and resource ('Delete one food from a diary entry ... or the whole entry') and distinguishes the two scopes by the presence or absence of `item_index`. An agent can separate this from siblings like log_meal, update_meal, and get_day without opening any schema.

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 clearly states the two operating modes and the condition that selects each ('by item_index' vs 'without it'), plus the not-found error case, which is genuine when-to-use guidance. It does not name update_meal as the non-destructive alternative, so it stops short of explicit alternative routing.

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.