get_ruler_rules
Retrieves all alert rules from Grafana's Ruler API, returning a dictionary mapping namespaces to rule groups. Provides read-only access as an alternative to the Provisioning API.
Instructions
Get all alert rules from the Ruler API.
Returns a dict mapping namespace (folder) to list of rule groups. Each rule group contains rules and evaluation configuration. This is the non-admin alternative to the Provisioning API.
Args: connection_name: Name of the Grafana connection
Returns: JSON string with all rule groups organized by namespace.
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": {
"connection_name": "<connection_name>"
},
"name": "get_ruler_rules"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| connection_name | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |