Skip to main content

Health

Daily check-ins, routines, and workout sessions. health section.
2 min read

12 tools in two files, gated on the health section.

Check-ins and sessions — health.ts#

ToolR/WEndpoint
list_health_checkinsRGET /health/profiles/{ws}/checkins
upsert_health_checkinWPUT .../checkins/upsert
list_health_routinesRGET .../routines
list_health_sessionsRGET .../sessions
get_health_sessionRGET .../sessions/{sessionId}
update_health_sessionWPATCH .../sessions/{sessionId}
create_health_sessionWPOST .../sessions

Check-ins#

A check-in is the daily wellbeing log: sleep quality, day rating, energy, mood, water, and notes. Ratings use a 1–3 scale.

upsert_health_checkin is indexed by dateKey: calling it twice for the same day updates that entry instead of creating a second one. That makes it naturally idempotent, which is why it needs no approval despite being a write — a replay does not duplicate anything.

Workout sessions#

create_health_session records a workout already done: "I ran 5k today". sportLabel is the exercise type; routineId is optional and is resolved with list_health_routines.

PerformedAt is a time.Time in Go, so the tool takes performedOn as a date key plus an optional performedAtTime, and the handler converts to RFC3339 (noon by default).

Routines and metrics — health_routines.ts#

ToolR/WEndpoint
get_health_routineRGET .../routines/{routineId} (+ blocks)
list_health_metricsRGET .../metrics/definitions (+ optional entries)
log_health_metricWPOST .../metrics/entries
get_health_metric_trendRdefinitions + entries (derived)
manage_healthWdispatcher

list_health_metrics without metricId lists definitions; with metricId it adds recent entries. log_health_metric is the day-to-day tool; creating/editing definitions goes through manage_health.

Dispatcher manage_health#

ResourceOps
routinescreate, update
routineBlocksreplace
metricDefinitionscreate, update
checkinsdelete (approval)

Prefer narrow tools for sessions, check-ins, and log_health_metric.

Warning

Eve logs what the user tells it. It is not a clinician: the prompt forbids interpreting these figures as medical advice or diagnosing anything.

Bulk create — health_bulk.ts#

ToolR/WEndpoint
bulk_create_health_checkinsWPOST .../checkins/bulk-create
bulk_create_health_sessionsWPOST .../sessions/bulk-create
bulk_create_health_metric_entriesWPOST .../metrics/entries/bulk-create

Cap 50, partial success { ids, errors }. For a single day prefer upsert_health_checkin.