Skip to main content
Glama
io.github.rwestergren/cronometer-api-mcp

io.github.rwestergren/cronometer-api-mcp

by rwestergren

set_macro_targets

Idempotent

Update daily macro targets in grams, weekly weight goal, and sodium limits in Cronometer; only passed values change, so confirm and read current targets first.

Instructions

Set the daily macro targets in grams, the weekly weight goal and/or sodium.

Confirm the new values with the user first, and read the current ones with get_macro_targets so they can be put back. Only the arguments you pass change.

Gram targets require Fixed Targets mode in Cronometer's Macro & Energy Targets settings.

The calorie target cannot be set directly: Cronometer computes it from BMR, activity level and the weight goal. Move it with weight_goal_per_week (in the account's weight unit per week, negative to lose; each 1 lb/week is about 500 kcal/day). Check the result with get_food_log's energy_summary.total_target_kcal.

Args: protein_g: Daily protein target in grams. fat_g: Daily fat target in grams. net_carbs_g: Daily net-carb target in grams. weight_goal_per_week: Weight change per week, -2 to 2 (e.g. -1.5). sodium_mg_min: Daily sodium target (lower bound) in mg. sodium_mg_max: Daily sodium upper limit in mg.

Gram targets are written to both places the app keeps them (profile prefs and the per-nutrient target rows), so the diary summary and the target bars agree.

Tool call template

This tool declares no required parameters. Add optional parameters from the input schema as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {},
    "name": "set_macro_targets"
  }
}

Input Schema

NameRequiredDescriptionDefault
fat_gNo
protein_gNo
net_carbs_gNo
sodium_mg_maxNo
sodium_mg_minNo
weight_goal_per_weekNo

Output Schema

NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.7

TDQS

A4.8/5.0
Behavior5/5

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

Annotations only give readOnly=false, idempotent=true, destructive=false. The description goes well beyond: it discloses the partial-update semantics ('Only the arguments you pass change'), that values are written to two storage locations so diary summary and target bars agree, and that the calorie target cannot be set directly but must be driven indirectly through weight_goal_per_week with a ~500 kcal/day conversion. That is exactly the kind of non-obvious behavior the annotations cannot convey.

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, then workflow, then constraints, then an Args block. Every section is useful, though the Args block partially repeats what the schema's parameter names already imply and the closing storage-location note could be tightened.

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 6-parameter mutation tool with no schema descriptions, the description covers prerequisites, partial-update behavior, indirect calorie effects, and even how to verify the outcome (get_food_log's energy_summary.total_target_kcal). An output schema exists, so return values need not be restated.

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 0%, so the description must carry the load, and it does for most parameters: sodium_mg_min is a lower bound vs sodium_mg_max an upper limit, and weight_goal_per_week is bounded -2 to 2 with sign meaning and a kcal conversion rule. The gram parameters get only a one-line meaning each with no valid ranges or units caveats, which is the main residual gap.

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?

Opens with a specific verb and resource: 'Set the daily macro targets in grams, the weekly weight goal and/or sodium.' It is immediately distinguishable from the read-side sibling get_macro_targets, which is named later.

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?

Explicit prerequisites and workflow: confirm new values with the user, read current values via get_macro_targets so they can be restored, and note that only passed arguments change. It also states the required 'Fixed Targets mode' in Cronometer settings, which is a genuine gating condition.

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