Skip to main content
Glama

log_custom_food

Add a food item to a Garmin nutrition log by date and time, auto-selecting the meal window or defaulting to snacks, with Garmin custom or FatSecret food sources.

Instructions

Log a food item to a meal on a date

    Adds a food entry to the nutrition log. The meal is determined
    automatically by matching meal_time against each meal's
    startTime/endTime window; falls back to SNACKS if no window matches.

    Food sources:
      - "GARMIN" (default): user's custom food library. Use
        get_custom_foods to find food_id and serving_id.
      - "FATSECRET": branded/catalog food from FatSecret. Use
        search_foods to find food_id and serving_id. Pass the source
        value from the search_foods result (e.g. "FATSECRET").

    Garmin custom food IDs are 32-char hex UUIDs; FatSecret IDs are
    numeric strings (e.g. "4132350"). Passing the wrong source for a
    given food_id returns a 400 from Garmin.

    Args:
        meal_date: Date in YYYY-MM-DD format
        meal_time: Time in HH:MM:SS format (e.g. "12:30:00", account timezone)
        food_id: Food ID from get_custom_foods (GARMIN) or search_foods (FATSECRET)
        serving_id: Serving ID from get_custom_foods or search_foods
        serving_qty: Number of servings (default 1)
        source: Food namespace — "GARMIN" (default) or "FATSECRET"
    

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": {
      "meal_date": "<meal_date>",
      "meal_time": "<meal_time>",
      "food_id": "<food_id>",
      "serving_id": "<serving_id>"
    },
    "name": "log_custom_food"
  }
}

Input Schema

NameRequiredDescriptionDefault
sourceNoGARMIN
food_idYes
meal_dateYes
meal_timeYes
serving_idYes
serving_qtyNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond the annotations by disclosing that the meal is resolved automatically by matching meal_time against each meal's startTime/endTime window with a SNACKS fallback, that meal_time is interpreted in the account timezone, and that a source/ID mismatch returns a 400 from Garmin. These are non-obvious runtime behaviors an agent could not infer from readOnlyHint=false or openWorldHint=true.

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 action, then structured into a meal-resolution paragraph, a source list, and an Args block. The Args block duplicates parameter names already in the schema, but with 0% schema coverage that repetition is justified rather than wasteful.

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?

For a non-idempotent write with no output schema, the description covers inputs, meal resolution, and the primary failure mode. It omits what the call returns and whether re-logging the same food creates a duplicate entry, which matters given idempotentHint=false.

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 carries the full burden, and it does: it documents formats (YYYY-MM-DD, HH:MM:SS with timezone), the origin of food_id and serving_id per source, the serving_qty default, and the allowed source values. It even explains the ID shape difference (32-char hex vs numeric string) that makes the wrong pairing fail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb and resource ('Log a food item to a meal on a date') and clarifies the two food namespaces, which is the main ambiguity in this domain. It does not differentiate itself from the sibling log_food, so an agent must still infer which logging entry point to pick.

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?

Gives concrete routing guidance: use get_custom_foods for GARMIN IDs and search_foods for FATSECRET IDs, and pass the source value returned by the search. It stops short of saying when to prefer this tool over the sibling log_food.

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