aggregate
Run aggregation queries on Elasticsearch indices to compute statistics, counts, and groupings. Optionally filter documents before aggregating.
Instructions
Execute an aggregation query.
Args: index: Index to aggregate. aggs: Aggregation definition (e.g., {"status_count": {"terms": {"field": "status"}}}). query: Optional query to filter documents before aggregating.
Returns: Aggregation results with buckets and metrics.
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": {
"index": "<index>",
"aggs": "<aggs>"
},
"name": "aggregate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| aggs | Yes | ||
| query | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||