Log a workout
add_activityLog a workout in Fitatu from the activity catalog by supplying date, activity_id, minutes, and energy_kcal. Returns the new row_id for the entry.
Instructions
Log a workout from the activity catalog; returns its row_id. Fitatu stores energy_kcal as given and does not compute it (see search_activity). Each call adds an activity unless row_id is reused. data.ok says a re-read shows it.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| date | Yes | Day as YYYY-MM-DD; when the user says today, yesterday, this week or a weekday, call get_today and count from its date. | |
| row_id | No | Optional UUID version 1 for the new row; omit it to get a new id. Repeating the add with the same row_id and values does not log a second row: when a failed add's error has a retry_row_id, repeat it with that row_id. Never a row_id from get_day: a logged activity cannot be changed; remove it with remove_activity and add it again. | |
| minutes | Yes | Duration in minutes. | |
| activity_id | Yes | activity_id from search_activity. | |
| energy_kcal | Yes | Energy burned in kcal. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| ok | Yes | ||
| data | No | ||
| error | No | describe_error() of what went wrong; docs/AGENTS.md, Results and errors. |