Summarize a field over time
summarizeAn exact figure for one field over a span of days: its average, total, lowest or highest, or the number of days it was logged (for a yes/no field, the days answered yes). Optionally broken down by week, month or weekday, and computed over a second span to compare two stretches. Values are in the person's units. Report a figure as a fact about their record, never as a verdict on it.
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": {
"field": "<field>",
"op": "<op>",
"from": "<from>",
"to": "<to>"
},
"name": "summarize"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| by | No | Also break the span down by week, month or weekday. | |
| op | Yes | average, total, lowest or highest of a number field; count is the days with a value (for a yes/no field, the days answered yes). | |
| to | Yes | Last day, YYYY-MM-DD, inclusive. | |
| from | Yes | First day, YYYY-MM-DD. | |
| field | Yes | The field, by name (as get_overview lists it). | |
| extremes | No | Also list this many highest and lowest days, with dates. | |
| compare_to | No | A second span to compute the same figure over, for a side-by-side. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| to | Yes | ||
| days | Yes | ||
| from | Yes | ||
| unit | No | ||
| field | Yes | ||
| value | Yes | ||
| buckets | No | ||
| weekdays | No | ||
| compare_to | No | ||
| lowest_days | No | ||
| highest_days | No |