Skip to main content
Glama

create_custom_food

Create a custom food item in Garmin's nutrition library with per-serving nutritional values, returning foodId and servingId for logging.

Instructions

Create a custom food in the user's Garmin nutrition library

    Creates a new food item with nutritional information per serving.
    On success the response includes foodId and servingId needed for
    log_custom_food. If the API returns no data (204), use
    get_custom_foods(search=food_name) to retrieve those IDs.

    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.

    Args:
        food_name: Name of the custom food (e.g. "Homemade Chocolate Cookies")
        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 (e.g. "Three Bridges")
        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_name": "<food_name>",
      "calories": "<calories>"
    },
    "name": "create_custom_food"
  }
}

Input Schema

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

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?

Beyond the annotations (readOnlyHint=false, idempotentHint=false, openWorldHint=true), the description discloses the success return shape (foodId, servingId) and a concrete no-data edge case (204), which are real behavioral facts not in structured fields. It does not mention that re-invoking may create duplicates, consistent with idempotentHint=false but left unstated.

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 and the critical return-ID/204 guidance before the parameter block, so the highest-value information comes first. The Args block necessarily repeats defaults already in the schema, which is justified by the 0% coverage but is still some duplication.

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 an 18-parameter mutation with no output schema, the description covers what it produces (foodId, servingId), what to do when nothing is returned, and the non-obvious %DV-versus-absolute-unit trap for calcium, iron, and vitamin D. Nothing an agent needs to call it correctly is missing.

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 18 parameters, the description carries the full burden and does so: every field gets a name, example, and unit (grams for macros, mg for sodium/cholesterol/potassium/calcium/iron, mcg for vitamin D), plus the defaults for serving_unit and number_of_units.

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 opening line states a specific verb and resource ('Create a custom food in the user's Garmin nutrition library') and immediately scopes it to 'a new food item with nutritional information per serving,' which cleanly separates it from log_custom_food and get_custom_foods.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

It names two downstream/alternative tools with explicit conditions: log_custom_food needs the returned IDs, and get_custom_foods(search=food_name) is the recovery path when the API returns 204. It does not state an explicit 'do not use this to log a food' exclusion, so it falls just short of full when/when-not coverage.

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