Metrics Nest

v1.0.1
app.metricsnest/metrics-nest Checked 1 day ago Published 17 days ago

Ask Claude, ChatGPT or Cursor about your Apple Health data: workouts, sleep, food.

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

get_profile Profile

The account behind this key: its plan, the days this key may read (meta.history_floor and history_ceiling, null when open), the categories this key may read, the paired devices and when each last synced, the account time zone, and when this share expires (expires_at: past it, every call fails until the person renews the share in the app). Call this first.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.

list_metrics List metrics

Every metric there is a figure for, with its unit and the first and last day. Use the exact metric names from here in query_metrics.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.

query_metrics Query metrics

Each day's figures as the Metrics Nest app shows them, or weekly or monthly buckets. One row per metric and day (one per reading for metrics read reading by reading), already combined: food and water include what was logged in the app and what other apps wrote to Health, so never add rows together. Paged: follow next_cursor while it is set; meta.truncated names the days a page covers when there are more. A window outside what the share allows is narrowed to it (meta.history_floor and history_ceiling).

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
cursorstringThe cursor from the previous page, to continue.
fromstringFirst day, inclusive. Omitted: six days before `to`, so the last seven days only. Pass it for anything longer, up to 366 days per call.
granularitystringday (default) returns each day; week and month one row per bucket: the average as numValue, and bucket.min, max, sum and count. For a total such as steps or kcal in a week, read bucket.sum. Use week o…
limitintegerRows per page, 1 to 500.
metricstringA metric name from list_metrics. Omitted: all metrics, which pages a lot.
tostringLast day, inclusive. Omitted: today in the account time zone.

query_intraday Query hourly readings

Hour-by-hour readings such as heart rate, kept 90 days. One row per metric, hour and device. Needs the intraday category.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
cursorstringThe cursor from the previous page, to continue.
datestringOne day. Omitted: the most recent hours.
devicestring
limitintegerRows per page, 1 to 500.
metricstringA metric name from list_metrics.

list_nights List nights

One row per night, keyed by the morning it ended on: bed and wake times, and seconds asleep and in each stage. With several devices, the longest sleep is the night. get_night has the stages.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
cursorstringThe cursor from the previous page, to continue.
fromstringFirst day, inclusive. Omitted: 365 days before `to`, the most one call covers. For older rows, call again with an earlier `to`.
limitintegerRows per page, 1 to 500.
tostringLast day, inclusive. Omitted: today in the account time zone.

get_night Get a night

One night in full, including the stage-by-stage hypnogram.

ParameterTypeDescription
wake_date *stringThe morning the night ended, YYYY-MM-DD.
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.

list_workouts List workouts

Workouts with activity, start and end, duration, distance, energy, the heart rate summary and the note. Sets and the route are on get_workout.

ParameterTypeDescription
activitystring
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
cursorstringThe cursor from the previous page, to continue.
fromstringFirst day, inclusive. Omitted: 365 days before `to`, the most one call covers. For older rows, call again with an earlier `to`.
limitintegerRows per page, 1 to 500.
tostringLast day, inclusive. Omitted: today in the account time zone.

get_workout Get a workout

One workout in full: the heart rate trace (average bpm and how many readings, minute by minute from the start) and zones, and the exercises and sets and the route when they were shared.

ParameterTypeDescription
id *stringThe workout id from list_workouts.
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.

query_logs Query food, drink and weight logs

What the person logged in the app: food with calories, macros and fruit and veg portions, drinks by kind (coffee, water, alcohol...), and typed weight. Each entry carries its time and part of day: morning, midday, evening or late. For a day's totals, use query_metrics.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
cursorstringThe cursor from the previous page, to continue.
fromstringFirst day, inclusive. Omitted: six days before `to`, so the last seven days only. Pass it for anything longer, up to 366 days per call.
kindstring
limitintegerRows per page, 1 to 500.
part_of_daystring
tostringLast day, inclusive. Omitted: today in the account time zone.

list_exercises List exercises

Every exercise logged in a workout (bench press, squat...), most recently done first, with how many workouts it was in, the first and last day, the heaviest weight lifted in kg (best_weight_kg), and the muscles it trains (null where the person never said, for an exercise of their own). Use an id or name from here in exercise_history. Needs the sets category.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.

exercise_history Exercise history

How one exercise has gone over time, as the app's exercise screen shows it: every workout it was in, newest first, with the sets (weight kg, reps, RPE, time s, distance m, and reps_left — how many more reps the set had in it, which is how the app asks effort), the best set (the heaviest, then most reps) and its weight in kg (top_weight_kg), volume, mean RPE, hard sets (within three reps of failure) and whether it was a PR (heavier, or the same weight for more reps). Nothing is estimated. For "how is my bench press improving", read top_weight_kg and best_set over time. Needs the sets category…

ParameterTypeDescription
exercise *stringAn id or name from list_exercises.
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
fromstringFirst day, inclusive. Omitted: all history.
tostringLast day, inclusive.

muscle_sets Hard sets per muscle

Which muscles the training landed on over a window (default the last 7 days): hard sets per muscle — sets within three reps of failure, or unrated — read against the 10–20 per week most hypertrophy guidance uses, which muscles are still recovering (two or more hard sets in the last 48 hours), and exercises whose sets were not counted because the person never said what they train. For "what have I been training" or "what should I train next". Needs the sets category.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
fromstringFirst day, inclusive. Omitted: six days before `to`.
tostringLast day, inclusive. Omitted: today in the account time zone.

list_clients List clients

For a coach: the people who approved you as their coach, with what each lets you read and from when. Pass a client id as `client` to any other tool to read that person. A client who stopped sharing shows as ended.

list_goals List goals

The goals set in the app: daily or weekly targets on a metric (a calorie ceiling, a water or step target) and journeys toward a value (a weight to reach), each with its progress as the phone last computed it. Needs the goals category.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.

goal_history Goal history

One goal's progress day by day, newest first: the figure, the fraction of the way there and whether it was met, as the phone computed it on each sync. Use it for how a goal has gone, not only where it stands. The id is from list_goals.

ParameterTypeDescription
id *stringA goal id from list_goals.
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
fromstringFirst day, inclusive. Omitted: 365 days before `to`, the most one call covers. For older rows, call again with an earlier `to`.
tostringLast day, inclusive. Omitted: today in the account time zone.

list_badges List badges

The badges earned in the app, with tier and the time each was earned. Needs the goals category.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.

propose_workout Suggest a workout

Suggest a workout for the person to approve in the Metrics Nest app. This only leaves a suggestion: nothing is planned until they approve it on their phone, where they can also edit or reject it, and no workout is ever created, changed or deleted here. Call list_exercises first and give each exercise its exercise_id from there whenever it is one they have done; for one they have not, take its exercise_id from list_exercise_catalog when the app has it, and otherwise leave exercise_id out and give the name. Weights are kg. Make up a new idempotency_key for each suggestion and send the same one o…

ParameterTypeDescription
exercises *arrayIn the order they are to be done.
idempotency_key *stringUnique per suggestion; the same key again returns the first suggestion instead of a duplicate.
planned_for *stringThe day it is meant for, in the account time zone: today up to 28 days ahead.
title *stringWhat the session is, as the person will see it: "Upper body A".
activitystringstrength (default), run, ride, hike, swim, row, yoga, hiit or other.
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
rationalestringWhy this session, in a few sentences the person reads before approving.

list_exercise_catalog List the exercise catalog

Every exercise the Metrics Nest app offers, with the exercise_id propose_workout takes for it, its name and other names, its group, and the muscles it trains. The same for everybody; list_exercises is what this person has actually done.

list_saved_workouts List saved workouts

The workouts the person saved in the Metrics Nest app to start whenever they like ("Leg day", "Push A"), each with its id, exercises, sets and reps. propose_removing_saved_workout takes the id; propose_saved_workout adds a new one.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.

propose_saved_workout Suggest a saved workout

Suggest a named workout for the person to keep and start whenever they like ("Leg day"), rather than a session on one day (that is propose_workout). Nothing is saved until they approve it in the Metrics Nest app, where they can edit it first. Same exercises as propose_workout: exercise_id from list_exercises or list_exercise_catalog where there is one. Make up a new idempotency_key for each suggestion. Works only where the person allowed this connection to suggest (get_profile says can_propose).

ParameterTypeDescription
exercises *arrayIn the order they are to be done.
idempotency_key *stringUnique per suggestion; the same key again returns the first suggestion instead of a duplicate.
title *stringThe name it will be saved under: "Leg day".
activitystringstrength (default), run, ride, hike, swim, row, yoga, hiit or other.
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
rationalestringWhy this workout, in a few sentences the person reads before approving.

propose_removing_saved_workout Suggest removing a saved workout

Suggest taking one of the person's saved workouts away. Nothing is removed until they approve it in the Metrics Nest app; the workouts already done from it stay. The id is from list_saved_workouts.

ParameterTypeDescription
idempotency_key *stringUnique per suggestion.
saved_workout_id *stringA saved workout id from list_saved_workouts.
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
rationalestringWhy it should go, in a sentence or two.

list_proposals List suggested workouts

The workouts suggested through this connection, newest first, and what became of each: pending, approved, rejected, or expired (unanswered for a week, or past its day). action says which kind each was: plan (a session on a day), save (a named workout to keep) or remove (a saved one taken away). For an approved one, approved_exercises is what the person approved and edited says whether they changed it; workout_ids are the workouts it was run as, and get_workout has what was actually done.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
limitintegerHow many, newest first. Default 50.
statusstring

withdraw_proposal Withdraw a suggested workout

Take back a workout this connection suggested that the person has not answered yet: it leaves their list in the app. One they approved, rejected or that expired stays as it is. The id is from propose_workout or list_proposals.

ParameterTypeDescription
id *stringThe suggestion's id.
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.

propose_meal Suggest a meal

Suggest a meal for the person to approve in the Metrics Nest app. This only leaves a suggestion: nothing is logged until they approve it and then log it from their phone, where they can change it on the plate first; no log entry is ever created, changed or deleted here. Give each food a name and, where you can, its grams and its calories and macros for that portion; leave out any figure you do not know rather than guessing. Make up a new idempotency_key for each suggestion and send the same one only when retrying this exact call. Works only where the person allowed this connection to suggest (…

ParameterTypeDescription
idempotency_key *stringUnique per suggestion; the same key again returns the first suggestion instead of a duplicate.
items *arrayThe foods on the plate.
planned_for *stringThe day it is meant for, in the account time zone: today up to 28 days ahead.
title *stringWhat the meal is, as the person will see it: "Chicken rice bowl".
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
rationalestringWhy this meal, in a few sentences the person reads before approving.
slotstringWhich meal of the day it is for.

list_meal_proposals List suggested meals

The meals suggested through this connection, newest first, and what became of each: pending, approved, rejected, or expired (unanswered for a week, or past its day). log_ids are the food entries it was eaten as — query_logs has them, with meal_id set to the suggestion's id, and they say what was actually eaten, which may differ from what was suggested.

ParameterTypeDescription
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.
limitintegerHow many, newest first. Default 50.
statusstring

withdraw_meal_proposal Withdraw a suggested meal

Take back a meal this connection suggested that the person has not answered yet: it leaves their list in the app. One they approved, rejected or that expired stays as it is. The id is from propose_meal or list_meal_proposals.

ParameterTypeDescription
id *stringThe suggestion's id.
clientstringFor a coach: a client id from list_clients, to read that client. Omitted: your own account.