Aggregate Rows
notion_aggregateCompute counts, sums, and averages grouped by any Notion property without loading every row. Filter, group, and get totals plus top groups for how-many or how-much questions.
Instructions
Answer "how many / how much by X" without reading every row into context. Filters with where/filter (same as notion_query), groups by any property (multi-select, people, and relations count a row in each of its groups; dates can be bucketed by day/week/month/quarter/year), and computes metrics: count, count_values, count_empty, distinct, sum, avg, min, max, median, checked, percent_checked (e.g. ["count", "sum:Points"]). Returns totals and the top groups.
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": {
"database": "<database>"
},
"name": "notion_aggregate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| top | No | ||
| sort | No | ||
| where | No | ||
| filter | No | ||
| metrics | No | e.g. ["count", "sum:Points", "avg:Estimate"] | |
| database | Yes | ||
| group_by | No | ||
| max_rows | No | ||
| data_source_name | No |