Skip to main content
Glama
rwestergren

io.github.rwestergren/cronometer-api-mcp

by rwestergren

get_food_log

Read-onlyIdempotent

Retrieve logged food diary entries for a chosen day or recent days, including servings, nutrient totals, and calorie targets.

Instructions

Get diary entries for one day or the last N calendar days.

Prefer relative inputs for relative questions, rather than dates calculated from conversation history. For calorie/nutrient totals without individual entries, prefer get_daily_nutrition(days=N).

Returns every food entry logged for the day. Each "Serving" entry is enriched (best-effort) with the food's name, source, serving_size, servings, and that food's own nutrient profile scaled to the amount eaten. Non-food entries (exercise, biometrics) carry their own name.

serving_size defines one portion: quantity units weighing grams in total. servings is how many of those portions were consumed. For example, serving_size={quantity: 2, unit: "cookies", grams: 30} with servings=1 means two cookies eaten; servings=0.5 means one cookie eaten. The size uses the entry's selected measure, or the food's default as a fallback. For serving-based recipes, serving_size.grams is null because the API uses reference-serving counts instead of gram weights. An invalid serving_size.quantity is reported as null.

Note: the per-entry "nutrients" are each food's individual contribution, which is distinct from the day-level nutrition_summary aggregate below.

Also returns a top-level energy_summary field with pre-computed values most relevant to the user:

  • total_target_kcal: daily calorie target dynamically adjusted for expenditure and weight goal (equivalent to Cronometer's "Total Target" in the Energy Summary screen)

  • consumed_kcal: total calories consumed

  • remaining_kcal: calories remaining to stay on target (total_target_kcal - consumed_kcal). Always report this when summarizing the user's day. Prefer this over manually deriving values from the burn breakdown fields.

Also returns a nutrition_summary field with consumed totals for every nutrient the user tracks in Cronometer (macros plus any tracked micronutrients such as saturated fat, cholesterol, or omega-3/6):

  • macros: flat macro totals (energy, protein, carbs, net_carbs, fat, fiber, alcohol)

  • nutrients: the full list of tracked nutrients with amounts and units

Args: date: Inclusive end date: YYYY-MM-DD, today, yesterday, or N days ago. Defaults to today in the account timezone, resolved at call time. days: Number of calendar days, 1–31 (default 1). Includes the end date; days=3 includes today, date='yesterday', days=3 excludes today.

One day returns the usual date/diary/summaries. Multiple days return start_date, end_date, and a days list of those objects, oldest first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
dateNo
daysNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.2.4
    • addedInput schema / properties / days
      Added value: +{
      +  "default": 1,
      +  "maximum": 31,
      +  "minimum": 1,
      +  "title": "Days",
      +  "type": "integer"
      +}
  2. First observedv0.1.0

TDQS

A4.9/5.0
Behavior5/5

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

Annotations already declare readOnly/idempotent/non-destructive, but the description goes further: enrichment is 'best-effort', non-food entries carry their own name, invalid quantities report null, and per-entry nutrients are distinct from the day-level aggregate. It even tells the agent to prefer remaining_kcal over deriving values, which is actionable behavioral guidance.

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 purpose, then grouped into arg semantics, return shape, and summary fields; every section is labeled. It is long, and the detailed field-by-field enumeration of energy_summary/nutrition_summary partially overlaps the output schema, but the structure keeps it navigable and most content earns its place.

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?

For a two-param, zero-schema-coverage tool with tracked-nutrient complexity, the description covers input formats, enrichment caveats, aggregate-vs-per-entry distinction, and multi-day response shape. Even with an output schema present, the interpretive guidance (serving_size/servings examples, recipes with null grams) is exactly what an agent needs to call and read this correctly.

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 0%, so the description must carry the full burden, and it does: date accepts YYYY-MM-DD/today/yesterday/N days ago with timezone-resolved default, and days spans 1-31 with precise include/exclude semantics (days=3 includes today; date='yesterday', days=3 excludes today).

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 ('Get diary entries') with the exact scope: one day or the last N calendar days. It is immediately distinguishable from siblings like get_daily_nutrition, which it explicitly names as the totals-only alternative.

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?

Gives explicit routing rules: prefer relative inputs over dates computed from history, and use get_daily_nutrition(days=N) when only calorie/nutrient totals are wanted, without individual entries. Both a when-to-use and a when-to-use-something-else are present.

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