build_logql_query
Construct LogQL queries for Loki log analysis by specifying label selectors, filters, operations, and time windows to extract insights from log data.
Instructions
Help build a LogQL query with suggestions for log stream selectors and filters
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": {
"labels": "<labels>"
},
"name": "build_logql_query"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| labels | Yes | Label selectors as key-value pairs (e.g., {"job": "nginx", "level": "error"}) | |
| filter | No | Log line filter pattern (regex or contains) | |
| operation | No | LogQL operation/function to apply | |
| timeWindow | No | Time window for operations (e.g., "5m") | |
| filterType | No | Type of filter to apply | contains |