fitbit_sync
Sync Fitbit health data into a local cache for fast, offline queries. Use before querying with other Fitbit tools to update data.
Instructions
Sync Fitbit health data to the local cache.
Fetches data from the Fitbit API and stores it in SQLite for fast offline queries. Run this before using other fitbit_get_* tools.
Syncs incrementally: only fetches data newer than the most recent entry in each table. First sync fetches the specified number of days.
Args: data_types: What to sync. Options: "all", "heart_rate", "activity", "exercises", "sleep", "weight", "spo2", "hrv", "azm", "breathing_rate", "skin_temperature", "core_temperature", "cardio_fitness", "food_log". Comma-separated for multiple, e.g. "sleep,hrv". Default: "all". days: Days of history for first sync (default: 30). Ignored on subsequent syncs (uses last synced date). since: Optional "YYYY-MM-DD" backfill date. When set, fetches from this date regardless of what is already cached - use to pull history older than the current cache. Overrides incremental resume and days. until: Optional "YYYY-MM-DD" inclusive end date; requires since. Together they re-fetch and upsert exactly the since..until window - use to repair a gap in the middle of the cache without re-pulling everything from the gap to today.
Returns summary of records synced per data type. Not for querying data - use fitbit_get_heart_rate, fitbit_get_activity, fitbit_get_sleep, etc. instead.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| days | No | ||
| since | No | ||
| until | No | ||
| data_types | No | all |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |