grafana/mcp-grafana

Feature Request: Add update_alert_group tool (acknowledge, resolve, update state)

Open

#813 geöffnet am 29. Apr. 2026

Auf GitHub ansehen
 (0 Kommentare) (1 Reaktion) (0 zugewiesene Personen)Go (368 Forks)auto 404
good first issuehelp wanted

Repository-Metriken

Stars
 (3.078 Stars)
PR-Merge-Metriken
 (Durchschn. Merge 2T 3h) (37 gemergte PRs in 30 T)

Beschreibung

Summary

The current OnCall toolset only has `list_alert_groups` and `get_alert_group`. There are no write tools to act on an alert group — making it impossible for an AI agent to close the loop on an alert without switching to the Grafana UI.

Motivation

In an AI-driven on-call workflow, the full lifecycle of an alert group is:

  1. Detect → `list_alert_groups` / `get_alert_group` ✅ (exists)
  2. Acknowledge → signal investigation started ❌ missing
  3. Resolve → close out once fix is confirmed ❌ missing

Without these, an agent using the MCP can investigate and triage but cannot update the alert state — defeating the purpose of agentic on-call automation. This mirrors the same gap I raised for incidents in #748.

Dependency

The underlying Go client (`grafana/amixr-api-go-client`) also lacks these methods, so this request spans two layers:

  1. `amixr-api-go-client`: add `AcknowledgeAlertGroup`, `UnacknowledgeAlertGroup`, `ResolveAlertGroup`, `UnresolveAlertGroup` methods
  2. `mcp-grafana`: add a single `update_alert_group` tool in `tools/oncall.go`

Proposed Tool

type UpdateAlertGroupParams struct {
    AlertGroupID string \`json:"alertGroupId" jsonschema:"required,description=The ID of the alert group to update"\`
    State        string \`json:"state" jsonschema:"required,description=New state for the alert group. One of: acknowledged\\, unacknowledged\\, resolved\\, unresolved"\`
}

Should be gated behind `enableWriteTools` (same as `create_incident`).

Use Cases

  • AI agent acknowledges an alert group immediately upon starting triage (signals to the team that it's being handled)
  • AI agent resolves the alert group after confirming the root cause is fixed and the PR is merged

Related

  • #748 — same pattern for Grafana Incidents
  • `tools/oncall.go` — where the new tool would live
  • `grafana/amixr-api-go-client` — Go client needs the write methods added first

Contributor Guide