date_histogram
Aggregate document counts over time using a date field. Specify index, date field, and interval to get time buckets with counts.
Instructions
Get document counts over time (date histogram).
Args: index: Index to aggregate. field: Date field to aggregate on (e.g., "@timestamp"). interval: Time interval (minute, hour, day, week, month, year). query: Optional query to filter documents.
Returns: Time buckets with document counts.
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>",
"field": "<field>"
},
"name": "date_histogram"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| field | Yes | ||
| interval | No | day | |
| query | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||