![]() |
VOOZH | about |
Version 4.43 or later needs to be installed to add the server automatically
Use cases
Add a note (userNote activity) to an existing incident's timeline using its ID. The note body can include URLs which will be attached as context. Use this to add context to an incident.
Manage Grafana alerting routing configuration, including notification policies, contact points and time intervals. Notification policies define how alerts are grouped, routed, and which contact points receive them. Time intervals define active/mute periods for alert notifications. When to use: - Understanding how alerts are routed to contact points/receivers - Debugging why an alert went to a specific receiver - Checking grouping, timing, or mute interval settings When NOT to use: - Checking alert rule configuration or state (use alerting_manage_rules)
Manage Grafana alert rules with full CRUD capabilities and filtering. When to use: - Understanding why an alert is or isn't firing - Auditing alert rule configuration (queries, conditions, labels, notification settings) - Finding alert rules by state, folder, group, or name - Creating, updating, or deleting alert rules - Comparing rule versions to see what changed When NOT to use: - Checking how alerts are routed to receivers (use alerting_manage_routing)
Audits a Loki label strategy and optionally diagnoses query performance. Returns per-label verdicts, missing base labels, normalisation issues, and a recommended set. Pass datasourceUid for live cardinality or labels for static scoring; both may be combined.
Create a new annotation on a dashboard or panel. Set format to 'graphite' and provide 'what' for Graphite-format annotations.
Create a datasource. If type is ambiguous, call search_plugin_information first; install the plugin if needed. IMPORTANT: always call this tool twice. First call: provide only the type โ the tool returns a field schema. After receiving the schema, you MUST ask the user for every required field value explicitly; do not infer or use defaults without user confirmation. Second call: provide the type, the display name in the top-level name argument, schemaReviewed=true, and the fields map populated with values confirmed by the user. Never handle credentials โ remind the user to rotate any detected. Returns UID, health check, and a config page link.
Create a new Grafana incident. Requires title, severity, and room prefix. Allows setting status and labels. This tool should be used judiciously and sparingly, and only after confirmation from the user, as it may notify or alarm lots of people.
Create a Grafana snapshot from a full dashboard payload. Supports optional expiration and external snapshot fields.
About
MCP server for Grafana.
| Attribute | Details |
|---|---|
| Docker Image | mcp/grafanaโ |
| Author | grafanaโ |
| Repository | https://github.com/grafana/mcp-grafanaโ |
| Attribute | Details |
|---|---|
| Dockerfile | https://github.com/grafana/mcp-grafana/blob/583994f3a6ad17baf653388282eebd20c6b7ffe0/Dockerfileโ |
| Commit | 583994f3a6ad17baf653388282eebd20c6b7ffe0 |
| Docker Image built by | Docker Inc. |
| Docker Scout Health Score | ๐ Docker Scout Health Score |
| Verify Signature | COSIGN_REPOSITORY=mcp/signatures cosign verify mcp/grafana --key https://raw.githubusercontent.com/docker/keyring/refs/heads/main/public/mcp/latest.pub |
| Licence | Apache License 2.0 |
| Tools provided by this Server | Short Description |
|---|---|
add_activity_to_incident | Add activity to incident |
alerting_manage_routing | Manage alerting routing |
alerting_manage_rules | Manage alert rules |
analyze_loki_labels | Analyze Loki label strategy |
check_datasources_health | Check datasources health |
create_annotation | Create Annotation |
create_datasource | Create datasource |
create_folder | Create folder |
create_incident | Create incident |
create_snapshot | Create snapshot |
delete_snapshot | Delete snapshot |
find_error_pattern_logs | Find error patterns in logs |
find_slow_requests | Find slow requests |
generate_deeplink | Generate navigation deeplink |
get_alert_group | Get IRM alert group |
get_annotation_tags | Get Annotation Tags |
get_annotations | Get Annotations |
get_assertions | Get assertions summary |
get_current_oncall_users | Get current on-call users |
get_dashboard_by_uid | Get dashboard details |
get_dashboard_panel_queries | Get dashboard panel queries |
get_dashboard_property | Get dashboard property |
get_dashboard_summary | Get dashboard summary |
get_datasource | Get datasource |
get_incident | Get incident details |
get_oncall_shift | Get OnCall shift |
get_panel_image | Get panel or dashboard image |
get_plugin | Get plugin |
get_sift_analysis | Get Sift analysis |
get_sift_investigation | Get Sift investigation |
get_snapshot | Get snapshot |
grafana_api_request | Grafana API request |
install_plugin | Install plugin |
list_alert_groups | List IRM alert groups |
list_datasources | List datasources |
list_incidents | List incidents |
list_loki_label_names | List Loki label names |
list_loki_label_values | List Loki label values |
list_oncall_schedules | List OnCall schedules |
list_oncall_teams | List OnCall teams |
list_oncall_users | List OnCall users |
list_prometheus_label_names | List Prometheus label names |
list_prometheus_label_values | List Prometheus label values |
list_prometheus_metric_metadata | List Prometheus metric metadata |
list_prometheus_metric_names | List Prometheus metric names |
list_provisioning_repositories | List provisioning repositories |
list_pyroscope_label_names | List Pyroscope label names |
list_pyroscope_label_values | List Pyroscope label values |
list_pyroscope_profile_types | List Pyroscope profile types |
list_sift_investigations | List Sift investigations |
list_snapshots | List snapshots |
query_loki_logs | Query Loki logs |
query_loki_patterns | Query Loki patterns |
query_loki_stats | Get Loki log statistics |
query_prometheus | Query Prometheus metrics |
query_prometheus_histogram | Query Prometheus histogram percentile |
query_pyroscope | Query Pyroscope |
search_dashboards | Search dashboards |
search_folders | Search folders |
search_plugin_information | Search plugins |
suggest_loki_alloy_label_config | Suggest Alloy label enforcement config |
update_annotation | Update Annotation |
update_dashboard | Create or update dashboard |
update_datasource | Update datasource |
validate_provisioning_file | Validate provisioning file |
add_activity_to_incidentAdd a note (userNote activity) to an existing incident's timeline using its ID. The note body can include URLs which will be attached as context. Use this to add context to an incident.
| Parameters | Type | Description |
|---|---|---|
body | string | The body of the activity. URLs will be parsed and attached as context |
incidentId | string | The ID of the incident to add the activity to |
eventTime | stringoptional | The time that the activity occurred. If not provided, the current time will be used |
alerting_manage_routingManage Grafana alerting routing configuration, including notification policies, contact points and time intervals.
Notification policies define how alerts are grouped, routed, and which contact points receive them. Time intervals define active/mute periods for alert notifications.
When to use:
When NOT to use:
operation|string|The operation to perform: 'get_notification_policies' to retrieve the notification policy tree, 'get_contact_points' to list all contact points, 'get_contact_point' to get a specific contact point by name, 'get_time_intervals' to list all time intervals, 'get_time_interval' to get a specific time interval by name
contact_point_title|stringoptional|Title of the contact point to retrieve (required for get_contact_point operation)
datasource_uid|stringoptional|Optional: UID of an Alertmanager-compatible datasource to query for receivers. If omitted, returns Grafana-managed contact points. Only used with get_contact_points.
limit|integeroptional|The maximum number of results to return. Default is 100. Only used with get_contact_points.
name|stringoptional|Filter contact points by name (exact match). Only used with get_contact_points.
time_interval_name|stringoptional|Name of the time interval to retrieve (required for get_time_interval operation)This tool is read-only. It does not modify its environment.
alerting_manage_rulesManage Grafana alert rules with full CRUD capabilities and filtering.
When to use:
When NOT to use:
operation|string|The operation to perform: 'list', 'get', 'versions', 'create', 'update', or 'delete'. To create a rule, use operation 'create' and provide all required fields in a single call. To update a rule, first use 'get' to retrieve its full configuration, then 'update' with all required fields plus your changes.
annotations|objectoptional|Optional annotations for the alert rule
condition|stringoptional|The query condition identifier, e.g. 'A', 'B' (required for 'create', 'update')
data|arrayoptional|Array of alert query objects (required for 'create'/'update'). Each object has: datasourceUid (string, required), model (object with expr for data queries or type/expression/conditions for expressions), refId (string, auto-assigned if omitted), relativeTimeRange ({from, to} in seconds, defaults to {from:600,to:0}). For server-side expressions use datasourceUid 'expr'. Example: [{datasourceUid: 'prometheus', model: {expr: 'up == 0'}}, {datasourceUid: 'expr', model: {type: 'threshold', expression: 'A', conditions: [{evaluator: {type: 'gt', params: [0]}}]}}]
datasource_uid|stringoptional|Optional: UID of a Prometheus or Loki datasource to query for datasource-managed alert rules (for 'list' operation)
disable_provenance|booleanoptional|If true, the alert remains editable in the Grafana UI (sets X-Disable-Provenance header). Defaults to true.
exec_err_state|stringoptional|State on execution error: NoData, Alerting, OK (required for 'create', 'update')
folder_uid|stringoptional|The folder UID. For 'list': filter by exact folder UID (mutually exclusive with search_folder). For 'create'/'update': the folder to store the rule in (required).
for|stringoptional|Duration before alert fires, e.g. '5m' (required for 'create', 'update')
is_paused|booleanoptional|If true, the alert rule remains inactive, Default is false
keep_firing_for|stringoptional|Enables continous firing of alert for specified time even when condition is no longer met. Default is 0 (resolves immediately)
label_selectors|arrayoptional|Prometheus-style selectors to filter alert rules by labels. Each string is a selector e.g. '{severity="critical", team=~"backend."}'. All selectors must match (AND).
labels|objectoptional|Optional labels for the alert rule
limit_alerts|integeroptional|Limit alert instances per rule. For list: 0 omits alerts. For get: <=0 defaults to 200. Max 200.
matchers|arrayoptional|Label matchers to filter alert instances. Each string is a Prometheus-style matcher e.g. 'severity="critical"', 'env!="dev"', 'team=~"backend."'. Requires Grafana 12.4+.
missing_series_evals_to_resolve|integeroptional|Consecutive evaluation intervals with no data required to mark the alert as resolved. Default is 2.
no_data_state|stringoptional|State when no data: NoData, Alerting, OK (required for 'create', 'update')
notification_settings|objectoptional|Notification settings object. Fields: receiver (string, required), groupBy ([]string), groupWait/groupInterval/repeatInterval (duration strings), muteTimeIntervals/activeTimeIntervals ([]string).
org_id|integeroptional|The organization ID (required for 'create', 'update')
record|objectoptional|Recording rule config. Fields: from (string, required - ref ID e.g. 'A'), metric (string, required - metric name), targetDatasourceUid (string, optional).
rule_group|stringoptional|The rule group name (required for 'create', 'update')
rule_limit|integeroptional|Maximum number of rules to return (default 200, max 200). Requires Grafana 12.4+ (for 'list' operation)
rule_type|stringoptional|Filter by rule type (for 'list' operation)
rule_uid|stringoptional|The UID of the alert rule (required for 'get', 'versions', 'update', 'delete'; optional for 'create')
search_folder|stringoptional|Search folders by path using partial matching (for 'list' operation). Requires Grafana 12.4+. Mutually exclusive with folder_uid.
search_rule_name|stringoptional|Search alert rule names/titles using partial matching. Requires Grafana 12.4+ (for 'list' operation)
states|arrayoptional|Filter by alert state: firing, pending, normal, recovering, nodata, error (for 'list' operation)
title|stringoptional|The title of the alert rule (required for 'create', 'update')This tool may perform destructive updates.
analyze_loki_labelsAudits a Loki label strategy and optionally diagnoses query performance. Returns per-label verdicts, missing base labels, normalisation issues, and a recommended set. Pass datasourceUid for live cardinality or labels for static scoring; both may be combined.
| Parameters | Type | Description |
|---|---|---|
datasourceUid | stringoptional | Datasource UID (live mode). |
endRfc3339 | stringoptional | |
expectedBaseLabels | arrayoptional | |
labels | arrayoptional | Caller-supplied labels (static mode). |
maxLabels | integeroptional | |
perfMetrics | objectoptional | Runtime metrics; presence triggers perf diagnosis. |
selector | stringoptional | Optional LogQL selector for stats / perf diagnosis. |
startRfc3339 | stringoptional |
This tool is read-only. It does not modify its environment.
check_datasources_healthCheck datasource health. Filter by type or UIDs; omit both to check all.
| Parameters | Type | Description |
|---|---|---|
offset | integeroptional | Number to skip for pagination |
type | stringoptional | Plugin type filter; omit to check all |
uids | arrayoptional | UIDs to check |
This tool is read-only. It does not modify its environment.
create_annotationCreate a new annotation on a dashboard or panel. Set format to 'graphite' and provide 'what' for Graphite-format annotations.
| Parameters | Type | Description |
|---|---|---|
dashboardUid | stringoptional | Dashboard UID |
data | objectoptional | Optional JSON payload |
format | stringoptional | Set to 'graphite' to create a Graphite-format annotation |
graphiteData | stringoptional | Optional string payload for Graphite format |
panelId | integeroptional | Panel ID |
tags | arrayoptional | Optional list of tags |
text | stringoptional | Annotation text (required unless format is graphite) |
time | integeroptional | Start time epoch ms |
timeEnd | integeroptional | End time epoch ms |
what | stringoptional | Annotation text for Graphite format (required when format is graphite) |
when | integeroptional | Epoch ms timestamp for Graphite format |
create_datasourceCreate a datasource. If type is ambiguous, call search_plugin_information first; install the plugin if needed. IMPORTANT: always call this tool twice. First call: provide only the type โ the tool returns a field schema. After receiving the schema, you MUST ask the user for every required field value explicitly; do not infer or use defaults without user confirmation. Second call: provide the type, the display name in the top-level name argument, schemaReviewed=true, and the fields map populated with values confirmed by the user. Never handle credentials โ remind the user to rotate any detected. Returns UID, health check, and a config page link.
| Parameters | Type | Description |
|---|---|---|
name | string | Datasource display name |
type | string | Grafana datasource plugin type, for example prometheus |
access | stringoptional | How Grafana should access the datasource (proxy or direct) |
basicAuth | booleanoptional | Whether Grafana should use basic auth |
database | stringoptional | Optional database name |
fields | objectoptional | Datasource field values to provision, keyed by field key from the schema returned on the first call. The server uses each field's target (root or jsonData) to place values correctly in the YAML. Example: {"url": "http://prometheus:9090โ ", "httpMethod": "POST"}. |
isDefault | booleanoptional | Whether this should become the default datasource |
schemaReviewed | booleanoptional | Set to true on the second call to confirm you reviewed the schema and collected values from the user. |
url | stringoptional | Datasource base URL when required by the plugin |
withCredentials | booleanoptional | Whether Grafana should forward credentials such as cookies |
create_folderCreate a Grafana folder. Provide a title and optional UID. Returns the created folder.
| Parameters | Type | Description |
|---|---|---|
title | string | The title of the folder. |
parentUid | stringoptional | Optional parent folder UID. If set, the folder will be created under this parent. |
uid | stringoptional | Optional folder UID. If omitted, Grafana will generate one. |
create_incidentCreate a new Grafana incident. Requires title, severity, and room prefix. Allows setting status and labels. This tool should be used judiciously and sparingly, and only after confirmation from the user, as it may notify or alarm lots of people.
| Parameters | Type | Description |
|---|---|---|
roomPrefix | string | The prefix of the room to create the incident in |
severity | string | The severity of the incident |
title | string | The title of the incident |
attachCaption | stringoptional | The caption of the attachment |
attachUrl | stringoptional | The URL of the attachment |
isDrill | booleanoptional | Whether the incident is a drill incident |
labels | arrayoptional | The labels to add to the incident |
status | stringoptional | The status of the incident |
create_snapshotCreate a Grafana snapshot from a full dashboard payload. Supports optional expiration and external snapshot fields.
| Parameters | Type | Description |
|---|---|---|
dashboard | object | Complete dashboard model to snapshot (as returned by Grafana dashboard APIs) |
deleteKey | stringoptional | Secret key for deleting external snapshots. Required when external is true |
expires | integeroptional | Snapshot expiration in seconds (e.g. 3600 for 1 hour) |
external | booleanoptional | Store snapshot on external server. Requires key and deleteKey when true |
key | stringoptional | Custom snapshot key. Required when external is true |
name | stringoptional | Optional snapshot name |
delete_snapshotDelete a Grafana snapshot by snapshot key.
| Parameters | Type | Description |
|---|---|---|
key | string | Snapshot key to delete |
This tool may perform destructive updates.
find_error_pattern_logsSearches Loki logs for elevated error patterns compared to the last day's average, waits for the analysis to complete, and returns the results including any patterns found.
| Parameters | Type | Description |
|---|---|---|
labels | object | Labels to scope the analysis |
name | string | The name of the investigation |
end | stringoptional | End time for the investigation. Defaults to now if not specified. |
start | stringoptional | Start time for the investigation. Defaults to 30 minutes ago if not specified. |
This tool is read-only. It does not modify its environment.
find_slow_requestsSearches relevant Tempo datasources for slow requests, waits for the analysis to complete, and returns the results.
| Parameters | Type | Description |
|---|---|---|
labels | object | Labels to scope the analysis |
name | string | The name of the investigation |
end | stringoptional | End time for the investigation. Defaults to now if not specified. |
start | stringoptional | Start time for the investigation. Defaults to 30 minutes ago if not specified. |
This tool is read-only. It does not modify its environment.
generate_deeplinkGenerate deeplink URLs for Grafana resources. Supports dashboards (requires dashboardUid or provisioningPreview), panels (requires dashboardUid or provisioningPreview, plus panelId), and Explore queries (requires datasourceUid and optionally queries). For dashboard and panel links, provisioningPreview points at a dashboard staged on a provisioning repository branch (e.g. a git-sync PR preview). For explore links, the time range and queries are embedded inside the Grafana explore state. Set shorten=true to also attempt a /goto/ short URL; if shortening fails, the full deeplink is returned.
| Parameters | Type | Description |
|---|---|---|
resourceType | string | Type of resource: dashboard, panel, or explore |
dashboardUid | stringoptional | Dashboard UID (for stored dashboards). Mutually exclusive with provisioningPreview for dashboard and panel types. |
datasourceUid | stringoptional | Datasource UID (required for explore type) |
panelId | integeroptional | Panel ID (required for panel type) |
provisioningPreview | objectoptional | Identifies a dashboard staged on a provisioning repository branch (e.g. a git-sync PR preview). Mutually exclusive with dashboardUid for dashboard and panel types. |
queries | arrayoptional | List of query objects for explore links (e.g. [{"refId":"A","expr":"up"}]) |
queryParams | objectoptional | Additional URL query parameters (for dashboard/panel types) |
shorten | booleanoptional | If true, try to shorten the generated URL to /goto/. If shortening fails, return the original deeplink. |
timeRange | objectoptional | Time range for the link |
get_alert_groupGet a specific alert group from Grafana OnCall by its ID. Returns the full alert group details.
| Parameters | Type | Description |
|---|---|---|
alertGroupId | string | The ID of the alert group to retrieve |
This tool is read-only. It does not modify its environment.
get_annotation_tagsReturns annotation tags with optional filtering by tag name. Only the provided filters are applied.
| Parameters | Type | Description |
|---|---|---|
limit | stringoptional | Max results, default 100 |
tag | stringoptional | Optional filter by tag name |
This tool is read-only. It does not modify its environment.
get_annotationsFetch Grafana annotations using filters such as dashboard UID, time range and tags.
| Parameters | Type | Description |
|---|---|---|
alertUid | stringoptional | Filter by alert UID |
dashboardUid | stringoptional | Filter by dashboard UID |
from | integeroptional | Epoch ms start time |
limit | integeroptional | Max results default 100 |
matchAny | booleanoptional | If true, match any tag (OR). If false, match all tags (AND). Default: false |
panelId | integeroptional | Filter by panel ID |
tags | arrayoptional | Filter by tags. Multiple tags allowed; use matchAny to control AND/OR logic |
to | integeroptional | Epoch ms end time |
type | stringoptional | annotation or alert |
userId | integeroptional | Filter by creator user ID |
This tool is read-only. It does not modify its environment.
get_assertionsGet assertion summary for a given entity with its type, name, env, site, namespace, and a time range
| Parameters | Type | Description |
|---|---|---|
endTime | string | The end time in RFC3339 format (e.g. 2024-01-01T00:00:00Z) or relative format (e.g. now) |
startTime | string | The start time in RFC3339 format (e.g. 2024-01-01T00:00:00Z) or relative format (e.g. now-1h) |
entityName | stringoptional | The name of the entity to list |
entityType | stringoptional | The type of the entity to list (e.g. Service, Node, Pod, etc.) |
env | stringoptional | The env of the entity to list |
namespace | stringoptional | The namespace of the entity to list |
site | stringoptional | The site of the entity to list |
This tool is read-only. It does not modify its environment.
get_current_oncall_usersGet the list of users currently on-call for a specific Grafana OnCall schedule ID. Returns the schedule ID, name, and a list of detailed user objects for those currently on call.
| Parameters | Type | Description |
|---|---|---|
scheduleId | string | The ID of the schedule to get current on-call users for |
This tool is read-only. It does not modify its environment.
get_dashboard_by_uidRetrieves the complete dashboard, including panels, variables, and settings, for a specific dashboard identified by its UID. The response includes 'apiVersion' and 'isV2': when 'isV2' is true the dashboard uses the v2 schema (panels live under 'elements' keyed by name, arranged by 'layout'; variables under 'variables'), otherwise it is classic v1 ('panels[]' with 'templating.list'). WARNING: Large dashboards can consume significant context window space. Consider using get_dashboard_summary for overview or get_dashboard_property for specific data instead.
| Parameters | Type | Description |
|---|---|---|
uid | string | The UID of the dashboard |
This tool is read-only. It does not modify its environment.
get_dashboard_panel_queriesRetrieve panel queries from a Grafana dashboard. Supports all datasource types (Prometheus, Loki, CloudWatch, SQL, etc.) and row-nested panels. Optionally filter to a specific panel by ID with panelId. Optionally provide variables for template variable substitution, which populates processedQuery and requiredVariables fields. Returns an array of objects with fields: title, query (raw expression), datasource (object with uid and type), and optionally processedQuery, refId, and requiredVariables.
| Parameters | Type | Description |
|---|---|---|
uid | string | The UID of the dashboard |
panelId | integeroptional | Optional panel ID to filter to a specific panel |
variables | objectoptional | Optional variable substitutions (e.g., {"job": "api-server"}) |
This tool is read-only. It does not modify its environment.
get_dashboard_propertyGet specific parts of a dashboard using JSONPath expressions to minimize context window usage. JSONPath targets the dashboard's native schema. Classic v1 paths: '$.title' (title), '$.panels[].title' (all panel titles), '$.panels[0]' (first panel), '$.templating.list' (variables), '$.annotations.list' (saved dashboard annotation queries/definitions), '$.tags' (tags), '$.panels[].targets[*].expr' (all queries). v2 dashboards (see isV2 from get_dashboard_by_uid) use different paths: '$.title', '$.elements' (panels, keyed by name), '$.variables' (variables), '$.annotations'. Use this instead of get_dashboard_by_uid when you only need specific dashboard properties.
| Parameters | Type | Description |
|---|---|---|
jsonPath | string | JSONPath expression to extract specific data (e.g., '$.panels[0].title' for first panel title, '$.panels[*].title' for all panel titles, '$.templating.list' for variables, '$.annotations.list' for saved dashboard annotation queries/definitions) |
uid | string | The UID of the dashboard |
This tool is read-only. It does not modify its environment.
get_dashboard_summaryGet a compact summary of a dashboard including title, panel count, panel types, variables, and other metadata without the full JSON. Use this for dashboard overview and planning modifications without consuming large context windows.
| Parameters | Type | Description |
|---|---|---|
uid | string | The UID of the dashboard |
This tool is read-only. It does not modify its environment.
get_datasourceRetrieves detailed information about a specific datasource by UID or name. Returns the full datasource model, including name, type, URL, access settings, JSON data, and secure JSON field status. Provide either uid or name; uid takes priority if both are given.
| Parameters | Type | Description |
|---|---|---|
name | stringoptional | The name of the datasource. Used if UID is not provided. |
uid | stringoptional | The UID of the datasource. If provided, takes priority over name. |
This tool is read-only. It does not modify its environment.
get_incidentGet a single incident by ID. Returns the full incident details including title, status, severity, labels, timestamps, and other metadata.
| Parameters | Type | Description |
|---|---|---|
id | string | The ID of the incident to retrieve |
This tool is read-only. It does not modify its environment.
get_oncall_shiftGet detailed information for a specific Grafana OnCall shift using its ID. A shift represents a designated time period within a schedule when users are actively on-call. Returns the full shift details.
| Parameters | Type | Description |
|---|---|---|
shiftId | string | The ID of the shift to get details for |
This tool is read-only. It does not modify its environment.
get_panel_imageRender a Grafana dashboard panel or full dashboard as a PNG image. Returns the image as base64 encoded data. Requires the Grafana Image Renderer service to be installed. Either dashboardUid (for stored dashboards) or provisioningPreview (for dashboards staged on a provisioning repository branch, e.g. a git-sync PR) must be supplied. Use this for generating visual snapshots of dashboards for reports, alerts, or presentations.
| Parameters | Type | Description |
|---|---|---|
dashboardUid | stringoptional | The UID of a stored dashboard containing the panel. Required unless provisioningPreview is provided. |
height | integeroptional | Height of the rendered image in pixels. Defaults to 500 |
panelId | integeroptional | The ID of the panel to render. If omitted, the entire dashboard is rendered |
provisioningPreview | objectoptional | Render a dashboard from a provisioning repository branch (e.g. a git-sync PR preview). Mutually exclusive with dashboardUid. |
scale | integeroptional | Scale factor for the image (1-3). Defaults to 1 |
theme | stringoptional | Theme for the rendered image: light or dark. Defaults to dark |
timeRange | objectoptional | Time range for the rendered image |
timeout | integeroptional | Rendering timeout in seconds. Defaults to 60 |
variables | objectoptional | Dashboard variables to apply. Values can be a single string or an array of strings for multi-value variables (e.g., {"var-datasource": "prometheus", "var-instance": ["server1", "server2"]}) |
width | integeroptional | Width of the rendered image in pixels. Defaults to 1000 |
This tool is read-only. It does not modify its environment.
get_pluginCheck whether a Grafana plugin is installed and retrieve its details (name, version, type, enabled status). Returns installed=false when the plugin is not found. Use install_plugin when a plugin is not installed to install plugin after confirming this action with the user.
| Parameters | Type | Description |
|---|---|---|
pluginId | string | The plugin ID to check (e.g. 'prometheus', 'grafana-piechart-panel', 'grafana-oncall-app') |
This tool is read-only. It does not modify its environment.
get_sift_analysisRetrieves a specific analysis from an investigation by its UUID. The investigation ID and analysis ID should be provided as strings in UUID format.
| Parameters | Type | Description |
|---|---|---|
analysisId | string | The UUID of the specific analysis to retrieve |
investigationId | string | The UUID of the investigation as a string (e.g. '02adab7c-bf5b-45f2-9459-d71a2c29e11b') |
This tool is read-only. It does not modify its environment.
get_sift_investigationRetrieves an existing Sift investigation by its UUID. The ID should be provided as a string in UUID format (e.g. '02adab7c-bf5b-45f2-9459-d71a2c29e11b').
| Parameters | Type | Description |
|---|---|---|
id | string | The UUID of the investigation as a string (e.g. '02adab7c-bf5b-45f2-9459-d71a2c29e11b') |
This tool is read-only. It does not modify its environment.
get_snapshotGet a Grafana snapshot by key, including snapshot metadata and dashboard payload.
| Parameters | Type | Description |
|---|---|---|
key | string | Snapshot key to retrieve |
This tool is read-only. It does not modify its environment.
grafana_api_requestMake an authenticated HTTP request to the Grafana API. Similar to 'gh api' for GitHub. Supports any Grafana API endpoint with optional jq-style response filtering. Use this for API endpoints that don't have a dedicated tool.
| Parameters | Type | Description |
|---|---|---|
endpoint | string | The API path relative to the Grafana base URL (e.g. '/api/org', '/api/dashboards/uid/abc123'). Must start with '/'. |
body | stringoptional | Request body (JSON string). Used with POST, PUT, and PATCH requests. |
headers | objectoptional | Additional HTTP headers to include in the request. |
jq | stringoptional | A jq expression to filter or transform the JSON response (e.g. '.dashboards[] |
method | stringoptional | HTTP method. Defaults to GET |
install_pluginInstall a Grafana plugin by its plugin ID. If the version is not already confirmed with the user, omit it โ the tool will look up the latest version and return it for confirmation before installing.
| Parameters | Type | Description |
|---|---|---|
pluginId | string | The plugin ID to install (e.g. 'grafana-image-renderer', 'grafana-piechart-panel') |
version | stringoptional | The exact version to install. Must be confirmed with the user before calling โ if unknown, omit this field to look up the latest version first. |
This tool may perform destructive updates.
list_alert_groupsList alert groups from Grafana OnCall with filtering options. Supports filtering by alert group ID, route ID, integration ID, state (new, acknowledged, resolved, silenced), team ID, time range, labels, and name. For time ranges, use format '{start}_{end}' ISO 8601 timestamp range (e.g., '2025-01-19T00:00:00_2025-01-19T23:59:59' for a specific day). For labels, use format 'key:value' (e.g., ['env:prod', 'severity:high']). Returns a list of alert group objects with their details. Supports pagination.
| Parameters | Type | Description |
|---|---|---|
id | stringoptional | Filter by specific alert group ID |
integrationId | stringoptional | Filter by integration ID |
labels | arrayoptional | Filter by labels in format key:value (e.g., ['env:prod', 'severity:high']) |
name | stringoptional | Filter by alert group name |
page | integeroptional | The page number to return |
routeId | stringoptional | Filter by route ID |
startedAt | stringoptional | Filter by time range in format '{start}_{end}' ISO 8601 timestamp range (UTC assumed, no timezone indicator needed) (e.g., '2025-01-19T00:00:00_2025-01-19T23:59:59') |
state | stringoptional | Filter by alert group state (one of: new, acknowledged, resolved, silenced) |
teamId | stringoptional | Filter by team ID |
This tool is read-only. It does not modify its environment.
list_datasourcesList all configured datasources in Grafana. Use this to discover available datasources and their UIDs. Supports filtering by type and pagination.
| Parameters | Type | Description |
|---|---|---|
limit | integeroptional | Maximum number of datasources to return (max 100) |
offset | integeroptional | Number of datasources to skip for pagination |
type | stringoptional | The type of datasources to search for. For example, 'prometheus', 'loki', 'tempo', etc... |
This tool is read-only. It does not modify its environment.
list_incidentsList Grafana incidents. Allows filtering by status ('active', 'resolved') and optionally including drill incidents. Returns a preview list with basic details.
| Parameters | Type | Description |
|---|---|---|
drill | booleanoptional | Whether to include drill incidents |
limit | integeroptional | The maximum number of incidents to return |
status | stringoptional | The status of the incidents to include. Valid values: 'active', 'resolved' |
This tool is read-only. It does not modify its environment.
list_loki_label_namesLists all available label/field names (keys) found in logs within a specified Loki or VictoriaLogs datasource and time range. Returns a list of unique label strings (e.g., ["app", "env", "pod"]). If the time range is not provided, it defaults to the last hour.
| Parameters | Type | Description |
|---|---|---|
datasourceUid | string | The UID of the datasource to query |
endRfc3339 | stringoptional | Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now) |
startRfc3339 | stringoptional | Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago) |
This tool is read-only. It does not modify its environment.
list_loki_label_valuesRetrieves all unique values associated with a specific labelName within a Loki or VictoriaLogs datasource and time range. Returns a list of string values (e.g., for labelName="env", might return ["prod", "staging", "dev"]). Useful for discovering filter options. Defaults to the last hour if the time range is omitted.
| Parameters | Type | Description |
|---|---|---|
datasourceUid | string | The UID of the datasource to query |
labelName | string | The name of the label to retrieve values for (e.g. 'app', 'env', 'pod') |
endRfc3339 | stringoptional | Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now) |
startRfc3339 | stringoptional | Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago) |
This tool is read-only. It does not modify its environment.
list_oncall_schedulesList Grafana OnCall schedules, optionally filtering by team ID. If a specific schedule ID is provided, retrieves details for only that schedule. Returns a list of schedule summaries including ID, name, team ID, timezone, and shift IDs. Supports pagination.
| Parameters | Type | Description |
|---|---|---|
page | integeroptional | The page number to return (1-based) |
scheduleId | stringoptional | The ID of the schedule to get details for. If provided, returns only that schedule's details |
teamId | stringoptional | The ID of the team to list schedules for |
This tool is read-only. It does not modify its environment.
list_oncall_teamsList teams configured in Grafana OnCall. Returns a list of team objects with their details. Supports pagination.
| Parameters | Type | Description |
|---|---|---|
page | integeroptional | The page number to return |
This tool is read-only. It does not modify its environment.
list_oncall_usersList users from Grafana OnCall. These are OnCall users (separate from Grafana users). Can retrieve all users in the OnCall directory, a specific user by ID, or filter by username. Returns a list of user objects with their details. Supports pagination.
| Parameters | Type | Description |
|---|---|---|
page | integeroptional | The page number to return |
userId | stringoptional | The ID of the user to get details for. If provided, returns only that user's details |
username | stringoptional | The username to filter users by. If provided, returns only the user matching this username |
This tool is read-only. It does not modify its environment.
list_prometheus_label_namesList label names in a PromQL-compatible datasource (Prometheus, Thanos, Mimir, Cloud Monitoring, etc.). Allows filtering by series selectors and time range.
| Parameters | Type | Description |
|---|---|---|
datasourceUid | string | The UID of the datasource to query |
endRfc3339 | stringoptional | Optionally, the end time of the time range to filter the results by. Supports RFC3339 or relative time (e.g. 'now') |
limit | integeroptional | Optionally, the maximum number of results to return |
matches | arrayoptional | Optionally, a list of label matchers to filter the results by |
projectName | stringoptional | GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource. |
startRfc3339 | stringoptional | Optionally, the start time of the time range to filter the results by. Supports RFC3339 or relative time (e.g. 'now-1h') |
This tool is read-only. It does not modify its environment.
list_prometheus_label_valuesUse after list_prometheus_metric_names to find label values for filtering queries. Gets the values for a specific label name in a PromQL-compatible datasource (Prometheus, Thanos, Mimir, Cloud Monitoring, etc.). Allows filtering by series selectors and time range.
| Parameters | Type | Description |
|---|---|---|
datasourceUid | string | The UID of the datasource to query |
labelName | string | The name of the label to query |
endRfc3339 | stringoptional | Optionally, the end time of the query. Supports RFC3339 or relative time (e.g. 'now') |
limit | integeroptional | Optionally, the maximum number of results to return |
matches | arrayoptional | Optionally, a list of selectors to filter the results by |
projectName | stringoptional | GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource. |
startRfc3339 | stringoptional | Optionally, the start time of the query. Supports RFC3339 or relative time (e.g. 'now-1h') |
This tool is read-only. It does not modify its environment.
list_prometheus_metric_metadataList Prometheus metric metadata. Returns metadata about metrics currently scraped from targets. Note: This endpoint is experimental.
| Parameters | Type | Description |
|---|---|---|
datasourceUid | string | The UID of the datasource to query |
limit | integeroptional | The maximum number of metrics to return |
limitPerMetric | integeroptional | The maximum number of metrics to return per metric |
metric | stringoptional | The metric to query |
projectName | stringoptional | GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource. |
This tool is read-only. It does not modify its environment.
list_prometheus_metric_namesDISCOVERY: Call this first to find available metrics before querying. Lists metric names in a PromQL-compatible datasource (Prometheus, Thanos, Mimir, Cloud Monitoring, etc.). Retrieves all metric names and filters them using the provided regex. Supports pagination and an optional time range to restrict results to metrics active within that window.
| Parameters | Type | Description |
|---|---|---|
datasourceUid | string | The UID of the datasource to query |
endRfc3339 | stringoptional | Optionally, the end time of the time range to filter the results by. Supports RFC3339 or relative time (e.g. 'now') |
limit | integeroptional | The maximum number of results to return |
page | integeroptional | The page number to return |
projectName | stringoptional | GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource. |
regex | stringoptional | The regex to match against the metric names |
startRfc3339 | stringoptional | Optionally, the start time of the time range to filter the results by. Supports RFC3339 or relative time (e.g. 'now-1h') |
This tool is read-only. It does not modify its environment.
list_provisioning_repositoriesList provisioning repositories (e.g. git-sync sources) configured for this Grafana instance. Returns each repository's slug along with its source URL, branch, path, sync state, and health. Use the returned name as the repo argument when rendering a not-yet-applied dashboard preview via get_panel_image's provisioningPreview parameter.
| Parameters | Type | Description |
|---|---|---|
namespace | stringoptional | Kubernetes-style namespace to list repositories from. Defaults to 'default' which matches single-tenant Grafana deployments. |
This tool is read-only. It does not modify its environment.
list_pyroscope_label_namesLists all available label names (keys) found in profiles within a specified Pyroscope datasource, time range, and optional label matchers. Label matchers are typically used to qualify a service name ({service_name="foo"}). Returns a list of unique label strings (e.g., ["app", "env", "pod"]). Label names with double underscores (e.g. name) are internal and rarely useful to users. If the time range is not provided, it defaults to the last hour.
| Parameters | Type | Description |
|---|---|---|
data_source_uid | string | The UID of the datasource to query |
end_rfc_3339 | stringoptional | Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now) |
matchers | stringoptional | |
start_rfc_3339 | stringoptional | Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago) |
This tool is read-only. It does not modify its environment.
list_pyroscope_label_valuesLists all available label values for a particular label name found in profiles within a specified Pyroscope datasource, time range, and optional label matchers. Label matchers are typically used to qualify a service name ({service_name="foo"}). Returns a list of unique label strings (e.g. for label name "env": ["dev", "staging", "prod"]). If the time range is not provided, it defaults to the last hour.
| Parameters | Type | Description |
|---|---|---|
data_source_uid | string | The UID of the datasource to query |
name | string | A label name |
end_rfc_3339 | stringoptional | Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now) |
matchers | stringoptional | Optionally, Prometheus style matchers used to filter the result set (defaults to: {}) |
start_rfc_3339 | stringoptional | Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago) |
This tool is read-only. It does not modify its environment.
list_pyroscope_profile_typesLists all available profile types available in a specified Pyroscope datasource and time range. Returns a list of all available profile types (example profile type: "process_cpu:cpu:nanoseconds:cpu:nanoseconds"). A profile type has the following structure: ::::. Not all profile types are available for every service. If the time range is not provided, it defaults to the last hour.
| Parameters | Type | Description |
|---|---|---|
data_source_uid | string | The UID of the datasource to query |
end_rfc_3339 | stringoptional | Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now) |
start_rfc_3339 | stringoptional | Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago) |
This tool is read-only. It does not modify its environment.
list_sift_investigationsRetrieves a list of Sift investigations with an optional limit. If no limit is specified, defaults to 10 investigations.
| Parameters | Type | Description |
|---|---|---|
limit | integeroptional | Maximum number of investigations to return |
This tool is read-only. It does not modify its environment.
list_snapshotsList Grafana dashboard snapshots with optional query and result limit filters.
| Parameters | Type | Description |
|---|---|---|
limit | integeroptional | Maximum number of snapshots to return (Grafana defaults to 1000 when omitted) |
query | stringoptional | Optional search query for snapshot name |
This tool is read-only. It does not modify its environment.
query_loki_logsExecutes a log query against a Loki or VictoriaLogs datasource and returns matching log entries (or metric samples on Loki). Defaults to the last hour, a limit of 10 entries, and 'backward' direction (newest first). The logql parameter takes LogQL on Loki and LogsQL on VictoriaLogs (e.g., Loki: {app="foo"} |= "error"; VictoriaLogs: {app="foo"} "error"). To count matching log lines precisely, use a count_over_time() metric query with queryType='instant'. Prefer using query_loki_stats first to cheaply check whether a stream contains data (avoiding expensive queries against empty streams) and list_loki_label_names / list_loki_label_values to verify labels exist before querying. Note: query_loki_stats returns approximate storage-level counts, not exact log line counts.
| Parameters | Type | Description |
|---|---|---|
datasourceUid | string | The UID of the datasource to query |
logql | string | The LogQL query to execute against Loki. This can be a simple label matcher or a complex query with filters, parsers, and expressions. Supports full LogQL syntax including label matchers, filter operators, pattern expressions, and pipeline operations. |
direction | stringoptional | Optionally, the direction of the query: 'forward' (oldest first) or 'backward' (newest first, default) |
endRfc3339 | stringoptional | Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') |
limit | integeroptional | Optionally, the maximum number of log lines to return (default max: 100, configurable by MCP server). |
queryType | stringoptional | Query type: 'range' (default) or 'instant'. Instant queries return a single value at one point in time. Range queries return values over a time window. Use 'instant' for metric queries when you want the current value. |
startRfc3339 | stringoptional | Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') |
stepSeconds | integeroptional | Resolution step in seconds for range metric queries. When running metric queries with queryType='range', this controls the time resolution of the returned data points. |
This tool is read-only. It does not modify its environment.
query_loki_patternsRetrieves detected log patterns from a Loki datasource for a given stream selector and time range. Returns a list of patterns, each containing a pattern string and a total count of occurrences. Patterns help identify common log structures and anomalies. The logql parameter must be a stream selector (e.g., {job="nginx"}) and does not support line filters or aggregations. Defaults to the last hour if the time range is omitted. Not supported on VictoriaLogs datasources - use a | stats pipeline instead.
| Parameters | Type | Description |
|---|---|---|
datasourceUid | string | The UID of the datasource to query |
logql | string | A LogQL stream selector to identify the logs to analyze for patterns (e.g. {job="foo", namespace="bar"}) |
endRfc3339 | stringoptional | Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') (defaults to now) |
startRfc3339 | stringoptional | Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') (defaults to 1 hour ago) |
step | stringoptional | Optionally, the query resolution step (e.g. '5m') |
This tool is read-only. It does not modify its environment.
query_loki_statsRetrieves index-level statistics about log streams matching a given selector within a Loki or VictoriaLogs datasource and time range. Returns an object containing the count of streams, chunks, entries, and total bytes (e.g., {"streams": 5, "chunks": 50, "entries": 10000, "bytes": 512000}). Important: the entries count reflects storage-level index entries (chunk metadata), NOT the number of individual log lines matching the selector. To count actual matching log lines, use query_loki_logs with a count_over_time() metric query instead. On VictoriaLogs only entries is populated; the other fields remain zero. The logql parameter must be a simple label selector (e.g., {app="nginx", env="prod"}) and does not support line filters, parsers, or aggregations. Defaults to the last hour if the time range is omitted.
| Parameters | Type | Description |
|---|---|---|
datasourceUid | string | The UID of the datasource to query |
logql | string | The LogQL matcher expression to execute. This parameter only accepts label matcher expressions and does not support full LogQL queries. Line filters, pattern operations, and metric aggregations are not supported by the stats API endpoint. Only simple label selectors can be used here. |
endRfc3339 | stringoptional | Optionally, the end time of the query in RFC3339 format or relative time (e.g. 'now') |
startRfc3339 | stringoptional | Optionally, the start time of the query in RFC3339 format or relative time (e.g. 'now-1h') |
This tool is read-only. It does not modify its environment.
query_prometheusWORKFLOW: list_prometheus_metric_names -> list_prometheus_label_values -> query_prometheus. Query a PromQL-compatible datasource (Prometheus, Thanos, Mimir, Cloud Monitoring, etc.) using a PromQL expression. Supports instant queries (single point) and range queries (time range). Time: RFC3339 or relative expressions like 'now', 'now-1h'.
| Parameters | Type | Description |
|---|---|---|
datasourceUid | string | The UID of the datasource to query |
endTime | string | The end time. Supported formats are RFC3339 or relative to now (e.g. 'now', 'now-1.5h', 'now-2h45m'). Valid time units are 'ns', 'us' (or 'ยตs'), 'ms', 's', 'm', 'h', 'd'. |
expr | string | The PromQL expression to query |
projectName | stringoptional | GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource. |
queryType | stringoptional | The type of query to use. Either 'range' or 'instant' |
startTime | stringoptional | The start time. Required if queryType is 'range', ignored if queryType is 'instant' Supported formats are RFC3339 or relative to now (e.g. 'now', 'now-1.5h', 'now-2h45m'). Valid time units are 'ns', 'us' (or 'ยตs'), 'ms', 's', 'm', 'h', 'd'. |
stepSeconds | integeroptional | The time series step size in seconds. Required if queryType is 'range', ignored if queryType is 'instant' |
This tool is read-only. It does not modify its environment.
query_prometheus_histogramQuery Prometheus histogram percentiles. DISCOVER FIRST: Use list_prometheus_metric_names with regex='.*_bucket$' to find histograms.
Generates histogram_quantile PromQL. Example: metric='http_duration', percentile=95, labels='job="api"'
Time formats: 'now-1h', '2026-02-02T19:00:00Z', '1738519200000' (Unix ms)
| Parameters | Type | Description |
|---|---|---|
datasourceUid | string | The UID of the Prometheus datasource |
metric | string | Base histogram metric name (without _bucket suffix) |
percentile | number | Percentile to calculate (e.g. 50, 90, 95, 99) |
endTime | stringoptional | End time (default: now). Supports RFC3339, relative, or Unix ms. |
labels | stringoptional | Label selector (e.g. job="api", service="gateway") |
projectName | stringoptional | GCP project name to query (Cloud Monitoring datasources only). Overrides or substitutes the defaultProject configured on the datasource. |
rateInterval | stringoptional | Rate interval for the query (default: 5m) |
startTime | stringoptional | Start time (default: now-1h). Supports RFC3339, relative (now-1h), or Unix ms. |
stepSeconds | integeroptional | Step size in seconds for range query (default: 60) |
This tool is read-only. It does not modify its environment.
query_pyroscopeUnified Pyroscope query tool for fetching profiles or metrics from Pyroscope. Profile data shows WHICH functions consume resources; metrics data shows WHEN consumption spiked. Use query_type="both" for complete analysis in one call.
query_type options (extends Grafana's PyroscopeQueryType):
data_source_uid|string|The UID of the datasource to query
profile_type|string|The profile type, use list_pyroscope_profile_types to discover available types
end_rfc_3339|stringoptional|End time in RFC3339 or relative time (e.g. 'now') (defaults to now)
group_by|arrayoptional|Labels to group metrics series by
matchers|stringoptional|Prometheus style matchers (defaults to: {})
max_node_depth|integeroptional|Max depth for profile call graph (default: 100)
query_type|stringoptional|Query type: "profile" (flamegraph), "metrics" (time-series), or "both" (default). Use "both" for complete analysis
start_rfc_3339|stringoptional|Start time in RFC3339 or relative time (e.g. 'now-1h') (defaults to 1 hour ago)
step|numberoptional|Seconds between metrics data points (default: auto)This tool is read-only. It does not modify its environment.
search_dashboardsSearch for Grafana dashboards by a query string. Returns a list of matching dashboards with details like title, UID, folder, tags, and URL.
| Parameters | Type | Description |
|---|---|---|
limit | integeroptional | Maximum number of results to return (max 100) |
page | integeroptional | Page number for pagination (1-indexed) |
query | stringoptional | The query to search for |
This tool is read-only. It does not modify its environment.
search_foldersSearch for Grafana folders by a query string. Returns matching folders with details like title, UID, and URL.
| Parameters | Type | Description |
|---|---|---|
query | stringoptional | The query to search for |
This tool is read-only. It does not modify its environment.
search_plugin_informationSearch the Grafana plugin catalog by keyword to discover available plugins before installing or getting plugin details on a specific instance. Returns results sorted by trust: official Grafana Labs plugins first, then commercial partner plugins, then community plugins. Use this tool when a user describes a plugin by purpose or partial name (e.g. 'azure monitoring', 'loki', 'database') โ it returns the exact pluginId to pass to get_plugin or install_plugin. Results include warnings for enterprise-only or Angular-based plugins.
| Parameters | Type | Description |
|---|---|---|
query | string | Keyword to search for plugins (e.g. 'azure', 'prometheus', 'loki', 'database'). Matches against plugin name, slug, description, and keywords. |
This tool is read-only. It does not modify its environment.
suggest_loki_alloy_label_configGenerates an Alloy loki.process snippet enforcing an approved label set via stage.label_keep, with optional log-level normalisation and soft-enforcement placeholders.
| Parameters | Type | Description |
|---|---|---|
approvedLabels | array | Labels to keep on the index. |
componentName | stringoptional | |
forwardTo | stringoptional | |
normalizeLogLevel | booleanoptional | |
requiredLabels | arrayoptional | Labels that get an 'unknown' placeholder when missing. |
This tool is read-only. It does not modify its environment.
update_annotationUpdates the provided properties of an annotation by ID. Only fields included in the request are modified; omitted fields are left unchanged.
| Parameters | Type | Description |
|---|---|---|
data | objectoptional | Optional JSON payload |
id | integeroptional | Annotation ID to update |
tags | arrayoptional | Tags to replace existing tags |
text | stringoptional | New annotation text |
time | integeroptional | New start time epoch ms |
timeEnd | integeroptional | New end time epoch ms |
This tool may perform destructive updates.
update_dashboardCreate or update a dashboard. Two modes: (1) Full JSON โ provide 'dashboard' for new dashboards or complete replacements. (2) Patch โ provide 'uid' + 'operations' to make targeted changes to an existing dashboard. One of these two modes is required; 'folderUid', 'message', and 'overwrite' are supplementary and do nothing on their own. Dashboard authoring guidance: if a saved query must support one, many, or All values from a multi-select variable inside a regex expression or matcher, save '${var:regex}' rather than plain '$var'. Saved dashboard annotation queries/definitions must be written into dashboard JSON under 'annotations.list'; the create_annotation tool creates annotation events and does not add a reusable dashboard annotation query/definition to the saved dashboard. For stat panels over the current dashboard range, make the query return the range-level result the stat should display; panel-side reduction only reduces returned series and does not compute peak-over-range or ratio-of-peaks semantics for you. Patch operations support JSONPaths like '$.panels[0].targets[0].expr', '$.panels[1].title', '$.panels[2].targets[0].datasource', '$.templating.list/-', and '$.annotations.list/-'. Append to arrays with '/- ' syntax: '$.panels/- '. Remove by index: {"op": "remove", "path": "$.panels[2]"}. Multiple removes on the same array are automatically reordered to avoid index-shifting issues. Note: only numeric array indices are supported in patch paths; filter expressions like [?(@.id==2)] and wildcards like [*] are not supported. v2 dashboards (check 'isV2' from get_dashboard_by_uid) use a different shape: patch '$.elements..spec.title' or '$.elements..spec.data.spec.queries[0].spec' and edit '$.variables'/'$.layout' rather than '$.panels'/'$.templating.list'. Full-JSON saves containing top-level 'elements'/'layout' are written as v2 and require a Kubernetes-capable Grafana. After creating or updating a dashboard, verify that panel queries return data by using run_panel_query or the appropriate query tool (query_prometheus, query_loki_logs, etc.) to validate expressions before considering the task complete.
| Parameters | Type | Description |
|---|---|---|
dashboard | objectoptional | The full dashboard JSON. Use for creating new dashboards or complete updates. Saved dashboard annotation queries/definitions live in 'annotations.list' inside this JSON; they are different from annotation events created with create_annotation. Large dashboards consume significant context - consider using patches for small changes. |
folderUid | stringoptional | The UID of the dashboard's folder |
message | stringoptional | Set a commit message for the version history |
operations | arrayoptional | Array of patch operations for targeted updates. More efficient than full dashboard JSON for small changes. Common paths: '$.templating.list/-' to add a variable, '$.annotations.list/-' to add a saved dashboard annotation query/definition, '$.panels[0].targets[0].expr' to replace a panel query. |
overwrite | booleanoptional | Overwrite the dashboard if it exists. Otherwise create one |
uid | stringoptional | UID of existing dashboard to update. Must be used together with 'operations'. Providing 'uid' without 'operations' will fail. |
userId | integeroptional | ID of the user making the change |
This tool may perform destructive updates.
update_datasourceUpdate non-secret datasource fields by UID. Omitted fields are preserved. For secrets, direct the user to the Grafana UI.
| Parameters | Type | Description |
|---|---|---|
uid | string | UID of the datasource to update |
access | stringoptional | proxy or direct |
basicAuth | booleanoptional | Enable basic auth |
database | stringoptional | Database name |
isDefault | booleanoptional | Make this the default datasource |
jsonData | objectoptional | Non-secret plugin settings; replaces existing jsonData when set |
name | stringoptional | Display name |
url | stringoptional | Base URL |
validate_provisioning_fileValidate a file in a provisioning repository at a given branch or commit by dry-run applying it. Returns whether the file would be accepted (valid), what resource action would result (create/update), the target resource type, and any structured validation errors. Use to confirm a draft dashboard or other resource will be accepted before merging or applying a PR โ this is the same validation surface that Grafana's PR commenter reports.
| Parameters | Type | Description |
|---|---|---|
path | string | File path within the repository (e.g. 'folder/dashboard.json'). |
repo | string | Provisioning repository slug. Get one from list_provisioning_repositories. |
namespace | stringoptional | Kubernetes-style namespace to read the repository from. Defaults to 'default'. |
ref | stringoptional | Branch or commit SHA. Defaults to the repository's main branch. |
This tool is read-only. It does not modify its environment.
{
"mcpServers": {
"grafana": {
"command": "docker",
"args": [
"run",
"-i",
"--rm",
"-e",
"GRAFANA_URL",
"-e",
"GRAFANA_API_KEY",
"mcp/grafana",
"--transport=stdio"
],
"env": {
"GRAFANA_URL": "http://localhost:3000",
"GRAFANA_API_KEY": "<your service account token>"
}
}
}
}