Get activity sessions
get_sessionsRetrieve continuous activity sessions grouped by app, project, and sub_project within 90-second gaps. Filter by period, app, project, tag, hour, weekday, device, and min duration.
Instructions
Continuous activity blocks reconstructed from the raw 30s entries — the natural grain for 'what did I work on this morning?'. Two consecutive entries are one session when they share the same (app, project, sub_project) and are within 90s of each other. Each session reports start/end/duration and tag/app metadata.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| period | No | today | yesterday | week | month | year | a single date YYYY-MM-DD | an inclusive date range YYYY-MM-DD..YYYY-MM-DD | today |
| app | No | Restrict to a single app (canonical name) | |
| project | No | Restrict to a single project (exact match) | |
| tag | No | Restrict to entries carrying a tag with this exact name | |
| min_seconds | No | Drop sessions shorter than this (default 0 — keep all) | |
| hour_start | No | Inclusive start hour 0-24 in local time. Combine with hour_end (e.g. 9 and 17 = 9am to 4:59pm). Omit both for no hour filter. | |
| hour_end | No | Exclusive end hour 0-24 in local time. Combine with hour_start. | |
| weekdays | No | Restrict to specific weekdays. 0=Sunday, 1=Monday, …, 6=Saturday. Omit or pass [0,1,2,3,4,5,6] for no weekday filter. | |
| device | No | Restrict to a single device. Pass 'current' (or 'this') for the local machine, a device UUID from get_device_breakdown, or a platform name like 'darwin', 'win32', 'browser-extension'. Omit or pass 'all' for no device filter. | |
| limit | No | Max sessions returned (default 200) |