health_rebuild
Rebuild a cached date range by refetching it from Google and previewing every row that would change or be removed before applying updates to the local cache.
Instructions
Fetch a date range again from Google and report every row that would change.
For when the cache may hold something Google no longer does, or holds it differently. These dates are fetched again, with a day either side, and a row Google sent before and no longer holds is removed. A removed row loses any imported value it carried, and the reply lists it with every value. Where Google still holds a row, an imported value beside Google's stays. History only an import wrote is never touched. A type whose fetch brings back nothing it can store keeps its rows, and says so in a note. A daily weight or body-fat figure synced before release 1.13.0 stays even after its readings are deleted. Without apply nothing is changed: the reply is a preview. Show the person what it lists before running it again with apply=True. A preview copies the cache into memory and makes the same requests to Google as applying does.
Args: since: First date to rebuild, "YYYY-MM-DD". Required. until: Last date, "YYYY-MM-DD". Default: today. data_types: "all", or comma-separated names as health_sync takes them. "account" has no dates and is never rebuilt. apply: If true, change the cache. Default: false, a preview.
Returns, per type, removed (each row Google no longer holds, with its values), changed (each row whose values differ, before and after), added and unchanged (counts), and the range the fetch covered. A type whose fetch fails has nothing removed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"since": "<since>"
},
"name": "health_rebuild"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| apply | No | ||
| since | Yes | ||
| until | No | ||
| data_types | No | all |