Skip to main content
Glama

log_meal

Records an itemized meal with macros and returns its meal ID plus the day's totals against targets.

Instructions

Log a meal you have already itemized with macros. Use this for any food except a saved meal the user names (use log_template). Returns meal_id and the day's totals vs. targets.

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": {
      "items": "<items>",
      "source": "<source>",
      "confidence": "<confidence>",
      "request_id": "<request_id>"
    },
    "name": "log_meal"
  }
}

Input Schema

NameRequiredDescriptionDefault
itemsYesOne entry per food
notesNo
sourceYesWhere the numbers came from
eaten_atNoISO 8601. No offset means local time. Omit for now.
meal_typeNoOmit to infer from local time of day
confidenceYesHow sure the estimate is
request_idYesFresh UUID per write; reuse it only when retrying

Output Schema

NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are supplied, so the description carries the full burden for a write operation. It does disclose the return payload (meal_id plus the day's totals vs. targets), which implies a persistent state change, but it says nothing about idempotency, retry behavior, duplicate handling, or failure modes — the request_id retry contract lives only in the schema.

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?

Three short sentences, no filler, with the core action and the itemization precondition front-loaded before the sibling routing note and return summary.

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?

An output schema exists and the schema is well documented, so return values and most parameters do not need repeating here; the description still summarizes the return anyway. The gap is behavioral: as an unannotated mutation tool it does not spell out idempotency/retry semantics or what a re-logged meal does to the day's totals.

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 86%, so the schema already documents items, source, eaten_at, meal_type, confidence, and request_id in detail. The description adds only the precondition that items must already carry macros, which is marginal over the schema's required-field list; baseline 3 applies when the schema does the heavy lifting.

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?

Specific verb+resource with a precondition ("Log a meal you have already itemized with macros") and an explicit carve-out naming the sibling that handles the other case (log_template for saved meals). An agent can distinguish this from log_template and edit_meal without opening either schema.

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?

States both the condition for use (food already itemized with macros) and the condition for using an alternative (a saved meal the user names -> log_template). That is a direct when/when-not routing rule rather than implied usage.

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