Query raw sessions (legacy)
query_sessionsLegacy tool: lists sessions from the v2 store, which keeps only about the last 7-14 days. search_sessions lists the same sessions from data_from on (about the last 6 months), with report-dimension filters. Paged with meta.cursor.next_cursor.
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": {
"container_id": "<container_id>",
"date_from": "<date_from>",
"date_to": "<date_to>"
},
"name": "query_sessions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| cursor | No | Pagination cursor from a previous response's meta.cursor.next_cursor. | |
| source | No | Filter by traffic source | |
| date_to | Yes | End date (YYYY-MM-DD) | |
| has_epik | No | Only sessions arriving with a Pinterest epik | |
| per_page | No | Items per page (default 50, max 1000 on v2). v2 SQLite reads are fast enough to prefer larger pages over more cursor round-trips. | |
| date_from | Yes | Start date (YYYY-MM-DD) | |
| has_adfcd | No | Only sessions arriving with an Adform adfcd | |
| has_gclid | No | Only sessions arriving with a Google Ads gclid | |
| has_fbclid | No | Only sessions arriving with a Facebook fbclid | |
| has_lsclid | No | Only sessions arriving with an lsclid | |
| has_scclid | No | Only sessions arriving with a Snapchat scclid | |
| has_ttclid | No | Only sessions arriving with a TikTok ttclid | |
| has_ga4clid | No | Only sessions arriving with a GA4 client ID | |
| has_msclkid | No | Only sessions arriving with a Microsoft msclkid | |
| has_rdt_cid | No | Only sessions arriving with a Reddit rdt_cid | |
| server_name | No | Server name (required when connected to multiple servers). | |
| container_id | Yes | Container ID (starts with "trc_"). | |
| has_li_fat_id | No | Only sessions arriving with a LinkedIn li_fat_id |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| meta | Yes | ||
| sessions | Yes | ||
| warnings | No |