Skip to main content
Glama

update_custom_food

Update an existing custom food in your Garmin nutrition library. Specify food_id and serving_id; fields you omit keep their current values.

Instructions

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

Fetches the food's current record 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.

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"). Default "G" number_of_units: Serving size in the specified unit. Default 100 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)

Input Schema

TableJSON 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_unitNoG
saturated_fatNo
number_of_unitsNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.5/5.0
Behavior4/5

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

With no annotations provided, the description carries the full burden of disclosing side effects. It clearly states that omitted fields preserve existing values (non-destructive merge) and warns about unit conversions, giving good transparency. It does not mention potential permission requirements or failure modes, but the core behavioral intent is well explained.

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 somewhat long but each paragraph serves a distinct purpose: one explains merge behavior, another clarifies unit conversions, and the last gives a prerequisite. The bullet-point parameter list is clear. It could be trimmed slightly, but no superfluous information is present.

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?

Given the tool's complexity (20 parameters, required fields, optional nutrient values), the description covers the key contextual points: how to identify the food, how to handle partial updates, and how to interpret nutritional units. It lacks a few edge-case details (e.g., what happens if the food_id doesn't exist), but overall it provides sufficient context for an agent to use the tool correctly.

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?

The schema already lists all parameters and defaults, but the description adds essential semantic meaning: it explicitly differentiates between absolute nutrient amounts and %DV, specifies units (grams, mg, mcg) for each nutrient, and highlights which fields are optional and preserved when omitted. This goes beyond the schema's bare property names.

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 clearly states the tool updates an existing custom food in the user's nutrition library, distinguishing it from creation or deletion. The verb 'update' and the target resource are explicit.

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 provides explicit usage guidance: it instructs the agent to call get_custom_foods first to find food_id and serving_id, and explains the merge semantics for omitted fields. This directly tells the agent when and how to use this tool compared to related food tools.

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