Skip to main content
Glama

Server Configuration

Describes the environment variables required to run the server.

NameRequiredDescriptionDefault
FOOD_TZNoTime zone for day boundaries (default `America/New_York`).America/New_York
FOOD_GOALNoOptional goal Claude checks progress against, e.g. `lean bulk to 180 lb by 2027-06-01, about 0.25 lb/week`.
FOOD_DB_PATHNoSQLite file (default `data/food.db`; `/data/food.db` on Fly).data/food.db
FOOD_LUNCH_ENDNoCutoff for guessing the lunch meal type (default 15:30).15:30
FOOD_DINNER_ENDNoCutoff for guessing the dinner meal type (default 21:00).21:00
FOOD_PUBLIC_URLYesPublic base URL; the OAuth issuer.
FOOD_DINING_HALLNoOptional name of your dining hall, so "I ate at North" triggers a menu lookup.
GOOGLE_CLIENT_IDYesGoogle OAuth client ID.
FOOD_IMPORT_TOKENYesBearer token for /menu-import, 32+ characters.
FOOD_ALLOWED_EMAILYesThe one Google account allowed to sign in.
FOOD_BREAKFAST_ENDNoCutoff for guessing the breakfast meal type (default 10:30).10:30
GOOGLE_CLIENT_SECRETYesGoogle OAuth client secret.

Instructions

Guidance the server publishes about itself, which clients place ahead of the tool catalog so the model reads it before choosing anything.

You log food and water for the user. When they send a meal photo or description: break it into items, estimate each item's portion and macros, and lean higher for dining-hall food (hidden oil and butter). Show the itemized estimate in one compact line per item, then log it immediately. Don't ask for confirmation unless an item is unidentifiable. Set source and confidence honestly. If they name a saved meal, use log_template. After logging, report the day's totals against targets in one line. Generate a fresh UUID for every write's request_id.

Dining hall: when they say they ate at the dining hall, call find_menu_items first and log found items with their published numbers (source="menu"); estimate only what isn't found. If no menu was imported, ask for a screenshot of the nutrition panel or estimate.

Nutrition labels: when they send a screenshot of a nutrition panel (e.g. from the dining hall menu), copy the label values exactly, multiply by the servings they ate, and log with source="menu" and confidence="high". Vitamin D in IU converts to mcg by dividing by 40. After the first time they log a plate, offer to save it with save_template.

Micronutrients (fiber, saturated fat, sodium, potassium, calcium, iron, magnesium, vitamin D) and grams are optional. Fill them from labels or menu data. For photo or description estimates, fill a micro only when reasonably confident; otherwise leave it out. Never pad. Micro totals report how many items had data; mention it when coverage is low.

Weekly check-in: call get_range for the last 14 days and, if a weight trend is available (for example from a connected scale), pull it for the same window. Compare the actual rate with the goal, propose a calorie target change in steps of about 100-150 kcal, and call set_targets only after the user agrees.

Notes: the server never estimates; every item needs kcal, protein_g, carbs_g, and fat_g. Timestamps without a UTC offset are the user's local time, and days are local calendar days. edit_meal with items replaces the meal's whole item list, so send every item that should remain. set_targets keeps any field you omit. Units are kcal; grams for macros, fiber, and saturated fat; mg for sodium, potassium, calcium, iron, magnesium; mcg for vitamin D; fl oz for water.

Capabilities

Features and capabilities supported by this server

Protocol revision2025-11-25

CapabilityDetails
tools
{
  "listChanged": false
}
prompts
{
  "listChanged": false
}
resources
{
  "subscribe": false,
  "listChanged": false
}

Tools

Functions exposed to the LLM to take actions

NameDescription
log_mealA

Log a meal you have already itemized with macros. Use this for any food except a saved meal the user names (use log_template). Returns meal_id and the day's totals vs. targets.

log_waterB

Log water in fl oz. Returns water_id and the day's totals, including water vs. target.

log_templateA

Log a saved meal by name, optionally scaled. Use when the user names a saved meal instead of describing food. Returns meal_id, the logged items, and the day's totals vs. targets.

save_templateA

Create or overwrite a saved meal, from explicit items or from an existing meal_id. Returns the saved items and totals, plus today's totals.

list_templatesA

List saved meals with their total macros. Use to find the exact name for log_template.

edit_mealA

Correct a logged meal: replace its items or change its type, time, or notes. Unspecified fields stay as they are. Returns the updated meal and its day's totals.

delete_entryA

Delete a meal or water entry by id (from get_day or a log result). Returns that day's updated totals.

get_dayA

Get every meal (with items and ids) and water entry for one local day, plus totals and remaining vs. that day's targets. Use for 'what did I eat' and before edits or deletes.

get_rangeA

Per-day totals and averages over a date range (max 92 days). Use for weekly check-ins and trends rather than calling get_day repeatedly.

set_targetsA

Set daily targets starting on a local date (default today). Omitted fields keep their current values; earlier days keep their old targets. Returns the stored targets row and today's totals.

find_menu_itemsA

Search the imported dining-hall menu for a date (default today) for published per-serving nutrition. Use it before estimating anything eaten at the dining hall. Returns up to 15 matches, or a note when no menu was imported for that date.

Prompts

Interactive templates invoked by user choice

NameDescription

No prompts

Resources

Contextual data attached and managed by the client

NameDescription

No resources

TDQS

A4/5.0

Scored across 11 tools

Disambiguation5/5

Each tool has a clearly distinct purpose, and the descriptions explicitly resolve the riskiest overlaps: log_meal vs log_template (itemized vs named saved meal), log_template vs save_template vs list_templates, and get_day vs get_range (single day vs trend window). Even edge tools like find_menu_items and set_targets sit in unambiguous territory.

Naming Consistency5/5

Every tool follows a strict verb_noun snake_case pattern (log_meal, get_range, save_template, edit_meal, delete_entry, set_targets, find_menu_items). Verbs are used consistently for their action class (log/save/list/get/set/edit/delete/find).

Tool Count5/5

11 tools is well within the ideal range, and each one earns its place: meal logging, water logging, template management, retrieval, targets, and menu lookup. No redundant or filller tools.

Completeness4/5

Meal lifecycle (log/edit/delete/get), water logging with delete, template create/list/apply, target setting, and range queries are all covered. Minor gaps remain: no way to delete or rename a saved template, no editing of a water entry (only delete), and no standalone get_targets, but these are workable around.

Maintenance

ActivityMaintained
ResponsivenessNo recent community issues