set_aggregation
Define an aggregation mapping from a detail column to a base column or table, enabling the engine to answer queries using the smaller pre-aggregated table.
Instructions
Define a user-defined AGGREGATION: mark a column on a (typically pre-aggregated) detail table as the aggregate of a base column or table, so the engine can transparently answer queries from the smaller table. summarization = GroupBy | Sum | Count | Min | Max. For GroupBy, baseColumnOrTable is a Table[Column]; for the aggregate functions it's the base table name (or a Table[Column]).
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": {
"sessionId": "<sessionId>",
"table": "<table>",
"detailColumn": "<detailColumn>",
"baseColumnOrTable": "<baseColumnOrTable>",
"summarization": "<summarization>"
},
"name": "set_aggregation"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| table | Yes | the detail/aggregation table the column is on | |
| sessionId | Yes | ||
| detailColumn | Yes | the column being mapped | |
| summarization | Yes | GroupBy | Sum | Count | Min | Max | |
| baseColumnOrTable | Yes | the base column (Table[Column]) for GroupBy, or the base table name for Sum/Count/Min/Max |