Skip to main content
Glama
rwestergren

io.github.rwestergren/cronometer-api-mcp

by rwestergren

update_custom_food

DestructiveIdempotent

Modify an existing custom food's nutrition, name, or serving size. Only the values you specify change, and diary entries using that food update automatically.

Instructions

Edit an existing custom food (one you created) in place.

Only the arguments you pass change; everything else keeps its current value. Find the food_id with search_foods (source "Custom") or get_food_details. Diary entries that already use the food pick up the new values. Recipes cannot be edited with this tool, even though they also show as source "Custom".

Nutrient amounts are per serving: the food's default serving, or serving_grams when you pass it. To change the serving weight without re-entering nutrition, pass serving_grams alone; the stored per-100g values stay put, so the per-serving numbers scale with the new weight.

Args: food_id: ID of the custom food to edit. name: New food name. calories: Calories per serving (kcal). protein_g: Protein per serving (g). fat_g: Fat per serving (g). carbs_g: Carbs per serving (g). fiber_g: Fiber per serving (g). sugar_g: Sugar per serving (g). sodium_mg: Sodium per serving (mg). saturated_fat_g: Saturated fat per serving (g). extra_nutrients: Additional nutrients keyed by Cronometer nutrient ID (from get_daily_nutrition) and valued per serving; must not reuse an ID the named args already cover. serving_name: New name for the default serving. serving_grams: New weight of the default serving in grams.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo
fat_gNo
carbs_gNo
fiber_gNo
food_idYes
sugar_gNo
caloriesNo
protein_gNo
sodium_mgNo
serving_nameNo
serving_gramsNo
extra_nutrientsNo
saturated_fat_gNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Addedv0.2.4

TDQS

A4.9/5.0
Behavior5/5

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

Beyond annotations (readOnlyHint false, destructiveHint true, idempotentHint true), the description reveals key behaviors: the in-place partial update semantics, that existing diary entries adopt new values, that nutrients are per serving, and that changing serving_grams scales per-serving values while leaving per-100g values intact. It also states a limitation (recipes not editable). No contradictions with annotations; the description adds substantial behavioral context.

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?

The description is thorough but not bloated. It front-loads the main purpose and then logically proceeds to usage, behavior, and parameter definitions. The length is justified given the 13 parameters and the need to explain nuanced partial-update behavior. It could be slightly tighter, but every sentence adds value, so it earns a 4.

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 tool with 13 parameters, 0% schema coverage, and an output schema, the description covers all necessary aspects: what it does, how to use it, what happens on update, parameter meanings, and exclusions. The presence of an output schema means return values need not be described. Nothing essential is missing for an agent to call this tool 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 description coverage is 0%, so the description must fully define parameters. It does: an 'Args:' block explains each parameter, including units (e.g., 'calories per serving (kcal)'), the meaning of serving_grams, and the extra_nutrients constraint ('must not reuse an ID the named args already cover'). This goes well beyond the bare property names, giving agents clear semantics for all 13 parameters.

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?

The description opens with a precise verb-resource pair: 'Edit an existing custom food (one you created) in place.' It clearly distinguishes the tool from siblings by noting that recipes cannot be edited even though they show as source 'Custom,' and it directs the agent to search_foods/get_food_details to find the food_id. This leaves no ambiguity about what the tool does.

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?

The description gives explicit usage guidance: it states the partial-update behavior ('Only the arguments you pass change'), specifies the exclusion ('Recipes cannot be edited with this tool'), and explains how to locate the food_id ('Find the food_id with search_foods (source "Custom") or get_food_details'). It also offers a specific scenario for changing serving weight without re-entering nutrition. These are concrete when-to-use and when-not-to-use instructions.

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