Skip to main content
Glama

Change a logged food

update_item
Destructive

Change a logged food row's quantity or eaten/planned status in Fitatu; only those fields can change. To edit another food or custom nutrition, remove the row and add it again.

Instructions

Change a logged food row: its quantity (in the row's own measure, see measure_name and measure_quantity in get_day) and/or eaten. Nothing else can be changed: for another food, or a custom row's name or nutrition, remove the row and add it again. Activities cannot be updated: remove and add them again. data.ok says a re-read shows the change; data.previous is the row's quantity and eaten before it, to undo the change.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateYesDay as YYYY-MM-DD; when the user says today, yesterday, this week or a weekday, call get_today and count from its date.
eatenNotrue for eaten, false for only planned.
row_idYesrow_id of a food row on that day, from get_day (meals[].items[].row_id).
quantityNoNew measure_quantity.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
okYes
dataNo
errorNodescribe_error() of what went wrong; docs/AGENTS.md, Results and errors.

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior4/5

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

Annotations already declare destructiveHint=true, idempotentHint=false, and readOnlyHint=false, but the description adds real value: it explains partial-update scope, that nothing else is changeable, and that data.previous enables undoing the change. It does not mention auth or rate limits, but the undo and re-read semantics are substantive behavioral detail beyond the annotations.

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-loads the action and mutable fields, then follows with constraints and return semantics; every clause carries information. It is dense with run-on phrasing but not padded.

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?

Covers the mutation's edge cases (what cannot change, alternatives), the undo path via data.previous, and re-read confirmation. With the output schema already documenting the return shape, nothing an agent needs to invoke it correctly is missing.

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 adds meaning by tying quantity to the row's own measure and pointing to measure_name/measure_quantity in get_day. This clarifies the unit semantics beyond what the schema field text alone conveys.

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?

States a specific verb (change/update) and resource (a logged food row), then enumerates exactly which fields are mutable (quantity, eaten). This distinguishes it clearly from add/remove siblings so an agent can select it without opening another 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?

Gives explicit boundaries and alternatives: for a different food or a custom row's name/nutrition, 'remove the row and add it again,' and activities cannot be updated. It describes the workflow rather than naming sibling tools like remove_items/add_food, so it is clear context with implied alternatives rather than fully explicit routing.

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