Query trends
query_trendsMetrics over time: event counts, unique users or sessions, the sum, average or p95 of a numeric property, optionally split by a property (one breakdown for every series, or each series by its own) and compared to the previous period. The workhorse for "how many / how much / is it growing" questions. interval "total" returns one de-duplicated number per series for the whole window.
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": {
"series": "<series>"
},
"name": "query_trends"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Window end, ISO 8601. Default now. | |
| from | No | Window start, ISO 8601 (e.g. "2026-09-01" or "2026-09-01T12:00:00Z"). | |
| last | No | Relative window ending now, e.g. "1h", "24h", "7d", "30d", "90d". Default "14d". Ignored when `from` is given. | |
| series | Yes | One to five metrics. Each: {event, aggregation, property?, filters?, label?, breakdown?}. `property` is required for sum, avg and p95. | |
| compare | No | Also compute the previous period of equal length. | |
| filters | No | Filters combined with AND/OR: {combinator: "AND", filters: [{property: {scope, key}, op, values: [..]}], groups: [nested groups]}. Ops: eq, neq, in, contains, gt, lt, is_set. Values are strings. | |
| project | No | Project handle (as in list_projects) or id. Optional when this connection is limited to one project or the workspace has only one. | |
| interval | No | Bucket size. Default chosen from the window (hour ≤2d, day ≤120d, week beyond). | |
| projects | No | Project handles (as in list_projects) or ids, to read across several apps. Leave out for every project this connection can reach. For one project use `project`; never pass both. | |
| breakdowns | No | Split every series without its own `breakdown` by one property. |