Skip to main content
Glama

update_meal

Idempotent

Correct a food already logged to the user's diary — fix a wrong calorie/macro value, quantity, or name, or move an entry to a different meal. Identify the entry by its id and local_date (both from get_day) and the food by its item_index within that entry's items[]. Only the fields you send change; the macros you send are MERGED onto the existing ones (so sending just kcal leaves protein/carb/fat as they were). This overwrites the value IN PLACE — there is no history of the previous value. Editing never moves an entry to another day (to do that, delete and re-log). SAFETY: all calorie and macro values here — including carbohydrates — are ESTIMATES (from USDA / Open Food Facts or the user's own entry), approximate and not lab-measured or per-batch. They are for general nutrition tracking ONLY. Do NOT use them for insulin dosing, carb-counting for a bolus, blood-glucose prediction, or any other medical decision, and do NOT compute a dose or glucose estimate from them. For anything medical, direct the user to the product's own label and their care team.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
idYesThe entry id to edit (from get_day).
mealNoMove the entry to a different meal label.
nameNo
noteNo
macrosNoCorrected macros — only the components you send 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 (from get_day).
caffeine_mgNoCorrected caffeine content, in milligrams.

TDQS

A4.9/5.0
Behavior5/5

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

The description discloses key behaviors beyond annotations: macros are MERGED, values are overwritten in place with no history, and editing never moves entries across days. The extensive safety warning about calorie/macro estimates not being for medical decisions adds critical context. Annotations (readOnly=false, idempotent=true, destructive=false) are not contradicted.

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

Conciseness5/5

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

The description is well-structured: purpose first, then mechanics, then safety. Every sentence provides useful instruction or critical caveat. Though the safety paragraph is long, it is justified given the potential medical misuse of the data.

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

Completeness4/5

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

The description is highly complete for a mutation tool, covering merge behavior, in-place overwrite, day-move exclusion, and item_index usage. It lacks an explicit statement about return value, but no output schema exists and the tool's primary usage is clear. This is a minor gap in an otherwise thorough description.

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

Parameters5/5

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

Schema coverage is 80%, but the description adds significant meaning: it explains merge semantics for macros, clarifies that item_index is required for food-level edits and optional for entry-level (meal/note), and identifies id/local_date as coming from get_day. This goes well beyond 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 clearly states the tool's purpose: 'Correct a food already logged to the user's diary' with specific examples (wrong calorie/macro value, quantity, name, or move to a different meal). This distinguishes it from sibling tools like log_meal (add) and delete_meal (remove).

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

Usage Guidelines5/5

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

The description tells the user when to use this tool (to correct logged food) and explicitly states an exclusion: 'Editing never moves an entry to another day (to do that, delete and re-log).' It also provides clear guidance on identifying the entry via id/local_date and using item_index for food-level edits.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool targets a distinct resource and action: pantry vs diary vs food search vs preferences vs diagnostics. Even similar tools like get_day/get_range are clearly differentiated by scope, and search_foods/lookup_barcode are distinguished by input type (text vs barcode).

Naming Consistency5/5

All tools follow a consistent verb_noun pattern with lowercase snake_case (add_pantry_item, get_day, log_meal, search_foods). The only exception is whoami, which is a standard diagnostic convention and does not disrupt the overall consistency.

Tool Count5/5

With 12 tools, the server is well-scoped for its food-tracking domain. Each tool covers a necessary function (pantry CRUD, diary CRUD, food search, preferences, diagnostics) without redundancy or bloat.

Completeness5/5

The tool set provides full lifecycle coverage for the core domain: pantry items can be added, read, and removed (upsert covers update); diary entries can be created, read (single/day/range), updated, and deleted; food lookup includes text search and barcode; and preferences are accessible. No obvious gaps hinder agent workflows.

Resources