aggregate_logs
Aggregate log events over a time range using count, average, percentile, min, max, or sum to perform statistical analysis of log data.
Instructions
Aggregate log data for a time range using the specified aggregation type (count, avg, percentile, min, max, sum). Useful for statistical analysis of logs.
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": {
"filter": "<filter>",
"from": "<from>",
"to": "<to>",
"aggregationType": "<aggregationType>"
},
"name": "aggregate_logs"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | End time as Unix timestamp (seconds/ms) or ISO 8601 string | |
| from | Yes | Start time as Unix timestamp (seconds/ms) or ISO 8601 string | |
| filter | Yes | Log filter query (e.g., "status:error", "service:checkout") | |
| aggregationType | Yes | Aggregation function to apply (e.g., "count" for log count, "avg" for average of numeric field) |