Skip to main content
Glama

metri: Calorie & Macro Tracker

Edit food consumption

metri_edit_consumption
Destructive

Correct a diary consumption using absolute target values. Returns the whole consumption as it now stands, shaped as in metri_get_diary, and the refreshed current-day dashboard. An item keeps its food as it was logged, so a quantity edit recalculates from that copy, not from later edits to the saved food; a batch item always reads its batch as last corrected.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "consumptionId": "<consumptionId>"
    },
    "name": "metri_edit_consumption"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameNoReplacement user-facing event name. Do not generate a paraphrase of a sole food item.
consumedAtNoNew time of the event, as local time in the user's time zone, such as 2026-10-22T13:05. A time metri returned, with its UTC offset, can be passed as it is. Omit to keep the current time.
itemChangesNoChanges to the event's items. Omit to keep the items as they are.
consumptionIdYesThe eating event to edit, from metri_get_diary or an earlier metri result.

Output Schema

NameRequiredDescriptionDefault
nameYes
itemsYes
renderYes
totalsYes
warningsNo
dashboardYes
consumedAtYes
consumptionIdYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4/5.0
Behavior4/5

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

Annotations already flag the write/destructive/idempotent profile, and the description adds genuinely non-obvious behavior: the response is the whole consumption shaped as in metri_get_diary plus a refreshed dashboard, and edits recalculate from the food snapshot as originally logged rather than from later edits to the saved food. The batch note ('a batch item always reads its batch as last corrected') further clarifies a subtle divergence. It stops short of stating atomicity or failure behavior when one of up to 100 item changes is invalid.

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 action and the return shape, then the two non-obvious semantics caveats; three sentences with no filler. The snapshot/batch sentence is dense but each clause earns its place, and nothing is repeated from the schema.

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

Completeness3/5

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

With an output schema present and rich annotations, the description needn't restate return values, and a cross-reference to metri_get_diary covers shape. What remains missing for a mutation accepting up to 100 nested item changes is error/atomicity behavior — whether a bad itemId aborts the whole call — which an agent needs before issuing a multi-item edit.

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 real meaning beyond the schema: it explains that quantity recalculation uses the logged copy of the food and that batch items resolve against the last correction, which governs how quantity.fractionOfBatch behaves. It also reinforces the 'absolute target values' framing for name/consumedAt, implying omission means no change.

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 and resource ('Correct a diary consumption using absolute target values') and immediately distinguishes the operation from create/delete siblings by specifying absolute targets rather than deltas or removals. It also declares the two return payloads, so an agent knows both what it mutates and what it gets back.

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

Usage Guidelines3/5

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

Usage is implied rather than stated: 'correct ... using absolute target values' plus 'Omit to keep the items as they are' tells the agent this edits an existing event in place, and the itemChanges action enum covers update/remove/add. However, it never names alternatives such as metri_log_consumption for new events or metri_delete_consumption for dropping an event entirely, and no prerequisites are given.

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.

Resources