Top Transaction Groups
top_nRank and return N groups by a chosen metric and dimension in descending metric order from completed bank statements, optionally scoped by accounts, date range, or filters.
Instructions
Return the top N groups ranked by metric (descending), per-currency for monetary metrics. Scope defaults to all your completed statements; pass "scope" to narrow to specific accounts/products and/or a date range.
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": {
"dimension": "<dimension>",
"metric": "<metric>",
"n": "<n>"
},
"name": "top_n"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| n | Yes | Number of top groups to return. | |
| scope | No | Optional structural scope (WHO × WHEN). Omit to search across all your completed statements. "accounts" is a list of account/product chips ({ kind: "account" | "product", id }, the id of an account descriptor or product returned by a tool); "dateRange" bounds by transaction date (YYYY-MM-DD). | |
| filter | No | Subset of transactions to operate on. All fields are optional and combined with AND logic. | |
| metric | Yes | Metric to rank by. | |
| dimension | Yes | Grouping dimension. |