Skip to main content
Glama

metri: Calorie & Macro Tracker

Log food consumption

metri_log_consumption

Record one complete eating event and return the refreshed current-day dashboard. Each item is a saved food by foodId or an inline non-batch food. Create a batch with metri_save_batch first, then log it by foodId. Log a batch by grams only when its finished weight is known; otherwise use fractionOfBatch. Returns each item's id and nutrition in the order of items.

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": {
      "name": "<name>",
      "items": "<items>"
    },
    "name": "metri_log_consumption"
  }
}

Input Schema

NameRequiredDescriptionDefault
nameYesRequired concise user-facing name for the complete eating event. Preserve a name supplied by the user; otherwise derive a natural name from the consumed foods in the user's language. For a single item, its food name is a valid event name.
itemsYesThe foods eaten in this event, one item per food.
consumedAtNoWhen the user ate, 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 when they are eating now: the server uses the current time.

Output Schema

NameRequiredDescriptionDefault
itemsYes
renderYes
totalsYes
warningsNo
dashboardYes
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 declare non-read-only, non-idempotent, non-destructive behavior. The description adds useful context beyond them: the call returns a refreshed current-day dashboard plus each item's id and nutrition, and omitting consumedAt means "now" on the server.

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 action and result, then packed with batch-specific rules. Every sentence carries operational information, with minimal framing waste.

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?

For a 3-parameter write tool with a full output schema and total schema coverage, the description covers inputs, batch semantics, timestamp defaults, and return shape. Only the non-idempotent duplicate-logging risk is left implicit.

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; the description still adds real meaning by explaining the saved-food vs inline-food choice, the batch logging routes, and the ordering of returned items relative to input items.

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

Purpose4/5

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

"Record one complete eating event and return the refreshed current-day dashboard" states a specific verb (record), resource (eating event), and side effect (refreshed dashboard). It distinguishes logging from editing or deleting, though it doesn't name those siblings explicitly.

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 concrete workflow routing: create a batch with metri_save_batch first and then log it by foodId, and use grams only when the batch's finished weight is known, otherwise fractionOfBatch. It lacks an explicit statement about when to use metri_edit_consumption instead of re-logging.

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