Skip to main content
Glama

create_custom_food

Create a custom food with nutritional values per serving in Garmin Connect, returning IDs for logging meals.

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)

Input Schema

TableJSON 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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.2/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full burden. It discloses the success response (foodId and servingId) and the 204 fallback, but does not mention potential errors, authentication, or other side effects beyond creation. This is adequate but not fully transparent.

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 well-structured with an intro, behavioral notes, and an Args list. It is slightly long but every sentence adds value, including the fallback and unit conversion reminders. No redundant or filler content.

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 schema covers all parameters and an output schema exists (per context), the description adds necessary context about the response and fallback. It tells the agent what to do with the output (use IDs for logging) and how to handle a 204. Missing minor details like uniqueness constraints, but overall complete.

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?

The schema has no descriptions, but the Args section in the description adds meaningful detail to every parameter, including units (mg, g, mcg) and clarifications like 'NOT %DV' for micronutrients. It also specifies allowed examples for serving_unit and defaults. This fully compensates for the schema's lack of descriptions.

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 specific verb 'Create' and the resource 'custom food in the user's Garmin nutrition library'. It also differentiates from siblings by noting that the returned foodId and servingId are needed for log_custom_food, making the purpose unambiguous.

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?

The description provides actionable guidance: it explains the fallback to get_custom_foods when a 204 is returned, and instructs converting %DV values to absolute units. While it does not explicitly say when to use this vs update or delete, the purpose is clear and these guidelines are helpful.

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