healthfolder

v0.1.0
io.github.CloudCorpRecords/healthfolder Checked 1 day ago Published 28 days ago

Read a Health Access folder of Apple Watch workouts and vitals; write training plans back as files.

These tools were reported by the server itself during our smoke test (tools/list), not copied from the README.

list_workouts

List workouts from the Health Access folder, newest first, with a one-line summary each. Read-only.

ParameterTypeDescription
limitintegerMaximum rows to return (default 20)
sincestringOnly workouts starting on or after this date (YYYY-MM-DD) or RFC 3339 timestamp
sportstringActivity filter: pool_swim, indoor_row, cycle, walk, run, ... (swim matches both swim kinds)

get_workout

Open one workout in full: the workout document plus summary, parts text and cardiac cost. Read-only.

ParameterTypeDescription
id *stringWorkout id: the full HealthKit UUID, its first 8 characters, or the file name
include_hr_seriesbooleanInclude the heart-rate series (default false)
include_lapsbooleanInclude laps (default true)

get_vitals

The seven-metric vitals view (resting HR, HRV, body mass, sleep, steps, VO2max, blood pressure) of the last N days, oldest first, with latest values and averages. Read-only.

ParameterTypeDescription
daysintegerHow many days back to read (default 30)

training_summary

Training summary: one entry per ISO week ending in the current week, empty weeks included. Read-only.

ParameterTypeDescription
weeksintegerHow many weeks to cover (default 8)

rate_workout

Store the athlete's own effort rating (1 to 10) and optional feel note in a workout file. Call only with a number the athlete said; an existing Apple rating is refused unless override is true.

ParameterTypeDescription
effort *numberThe effort rating the athlete stated, 1 to 10
id *stringWorkout id: the full HealthKit UUID, its first 8 characters, or the file name
feelstringOptional free-text note from the athlete
overridebooleanReplace an existing Apple rating when the athlete asks to change it (default false)

push_plan

Validate a healthaccess.plan.v1 training plan and write it into the folder's plans/ directory for the app to put on the Watch. Every validation violation is reported in one message.

ParameterTypeDescription
plan *objectThe plan object: name, sport, optional warmup/cooldown, and at least one block of steps

get_plan_status

Read a plan's status as the app recorded it: pending, scheduled, failed or cancelled. Read-only.

ParameterTypeDescription
id *stringThe plan id returned by push_plan

list_plans

List every plan in the folder's plans/ directory with its state, planned distance and time, newest first. Read-only.

get_day

Read one day file (days/<date>.json) with every Health group it holds. Read-only.

ParameterTypeDescription
date *stringThe day to read, YYYY-MM-DD

get_days

Read the day files in a date range (at most 366 days), oldest first, optionally reduced to named groups. Read-only.

ParameterTypeDescription
from *stringFirst day of the range, YYYY-MM-DD
to *stringLast day of the range, YYYY-MM-DD
groupsarrayOptional list of groups to keep in each day

get_catalog

Read catalog.json (which Health types have data and where they were exported) plus the export-coverage check. Read-only.

get_profile

Read profile.json: age, birth year, sex, blood type and the app's other profile fields. Read-only.

list_ecgs

List every ECG file in the folder's ecg/ directory, newest first. Read-only.