get_alert_rule_by_uid
Retrieve the complete configuration and detailed status of a Grafana alert rule using its unique identifier to inspect rule settings and current state.
Instructions
Retrieves the full configuration and detailed status of a specific Grafana alert rule
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": {
"uid": "<uid>"
},
"name": "get_alert_rule_by_uid"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| uid | Yes | The uid of the alert rule |
Implementation Reference
- Helper method in GrafanaClient that performs the actual API call to retrieve the alert rule by UID.
async getAlertRuleByUid(uid: string): Promise<AlertRule> { try { const response = await this.client.get(`/api/v1/provisioning/alert-rules/${uid}`); return response.data; } catch (error) { this.handleError(error); } }