Skip to main content
Glama

update_custom_food

Destructive

Update an existing custom food in your Garmin nutrition library while preserving omitted fields, so you can change only the nutritional values or serving details you specify.

Instructions

Update an existing custom food in the user's Garmin nutrition library

    Fetches the food's current record (by food_id, so renaming is safe)
    before writing so that omitted optional fields (brand, carbs, protein,
    fat, micros, etc.) preserve their existing values rather than being
    cleared. Only the fields you explicitly pass are changed; everything
    else is carried forward from the current record.

    Garmin replaces the whole record on update. If the current record
    cannot be read, the update is refused unless serving_unit and
    number_of_units are given; the call then replaces the record in full,
    and any brand or nutrient you omit is cleared.

    Only future logs see the change. Each food-log entry stores its own
    copy of the food's nutrition from when it was logged, so entries
    already logged, and those days' summaries, keep the old values. To
    correct a past day, delete_food_log each affected entry and log it
    again after the update.

    All nutrient amounts are ABSOLUTE values per serving, not %DV.
    Nutrition labels often print %DV for calcium/iron/vitamin D —
    convert to absolute units before passing.

    Use get_custom_foods first to find the foodId and servingId.

    Args:
        food_id: ID of the custom food to update (from get_custom_foods)
        serving_id: Serving ID of the food (from get_custom_foods)
        food_name: Name of the custom food
        calories: Calories per serving
        serving_unit: Unit for serving size (e.g. "G", "ML", "OZ");
            omit to preserve the existing value
        number_of_units: Serving size in the specified unit;
            omit to preserve the existing value
        brand_name: Brand or vendor name; omit to preserve the existing value
        carbs: Carbohydrates in grams per serving
        protein: Protein in grams per serving
        fat: Total fat in grams per serving
        fiber: Fiber in grams per serving
        sugar: Sugar in grams per serving
        saturated_fat: Saturated fat in grams per serving
        sodium: Sodium in mg per serving
        cholesterol: Cholesterol in mg per serving
        potassium: Potassium in mg per serving
        trans_fat: Trans fat in grams per serving
        calcium: Calcium in mg per serving (NOT %DV)
        iron: Iron in mg per serving (NOT %DV)
        vitamin_d: Vitamin D in mcg per serving (NOT %DV)
    

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": {
      "food_id": "<food_id>",
      "serving_id": "<serving_id>",
      "food_name": "<food_name>",
      "calories": "<calories>"
    },
    "name": "update_custom_food"
  }
}

Input Schema

NameRequiredDescriptionDefault
fatNo
ironNo
carbsNo
fiberNo
sugarNo
sodiumNo
calciumNo
food_idYes
proteinNo
caloriesYes
food_nameYes
potassiumNo
trans_fatNo
vitamin_dNo
brand_nameNo
serving_idYes
cholesterolNo
serving_unitNo
saturated_fatNo
number_of_unitsNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. 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 destructiveHint=true and idempotentHint=false, but the description goes well beyond them: it discloses the read-modify-write fetch-before-write flow, that Garmin replaces the whole record, the fallback behavior when the current record cannot be read (refused unless serving_unit and number_of_units are given, then full replacement clearing omitted fields), and that only future logs see the change. That is exactly the mutation-risk context an agent needs.

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 mutation semantics and edge cases before the parameter list, and every paragraph carries real information. The repeated 'omit to preserve the existing value' phrasing is mildly redundant, and the Args block is long, but given 20 undocumented parameters that verbosity is justified.

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?

Complete for a 20-parameter destructive mutation with no output schema and no annotation-level parameter docs: it covers preconditions, replace-vs-preserve semantics, the unreadable-record fallback, unit conventions, and downstream log effects. An agent has everything needed to call it without silent data loss.

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?

With 0% schema description coverage across 20 parameters, the description carries the full burden and does so: every parameter is listed with its unit (grams, mg, mcg) and the crucial caveat that calcium/iron/vitamin_d are ABSOLUTE amounts, not %DV. It also tags which fields are optional-by-omission ('omit to preserve the existing value') versus required, which the schema's default-null cannot express.

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+resource ('Update an existing custom food in the user's Garmin nutrition library') and the opening clause pairs it with the correct scope, making it immediately distinguishable from create_custom_food and delete_custom_food.

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?

Explicitly routes the agent to get_custom_foods first to obtain food_id/serving_id, and prescribes a remediation path (delete_food_log each affected entry and re-log) for the case where the user wants past days corrected. It also states the when-not condition: existing logs are unaffected, so re-logging is the only fix.

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

Deploy Server

Other Tools