Skip to main content

Grafana

Generated from .claude/mcps/.mcp-enterprise.json on 2026-09-11 — do not edit this page by hand; run task mcp:docs instead. 1 server(s) from Grafana, used across 1 product(s).

grafana

Query metrics and logs, manage alerts, and explore dashboards in Grafana.

  • Tools: 57 — alerting_manage_routing, alerting_manage_rules, alerting_manage_silences, analyze_loki_labels, check_datasources_health, generate_deeplink, get_alert_group, get_annotation_tags, get_annotations, get_assertions, get_current_oncall_users, get_dashboard_by_uid, get_dashboard_panel_queries, get_dashboard_property, get_dashboard_summary, get_datasource, get_doc, get_incident, get_oncall_shift, get_panel_image, get_plugin, get_sift_analysis, get_sift_investigation, get_snapshot, grafana_api_request, list_alert_groups, list_datasources, list_incident_custom_fields, list_incidents, list_loki_label_names, list_loki_label_values, list_oncall_schedules, list_oncall_teams, list_oncall_users, list_prometheus_label_names, list_prometheus_label_values, list_prometheus_metric_metadata, list_prometheus_metric_names, list_provisioning_repositories, list_pyroscope_label_names, list_pyroscope_label_values, list_pyroscope_profile_types, list_sift_investigations, list_snapshots, query_loki_logs, query_loki_patterns, query_loki_stats, query_prometheus, query_prometheus_histogram, query_pyroscope, search_dashboards, search_docs, search_folders, search_plugin_information, suggest_loki_alloy_label_config, user_info, validate_provisioning_file
  • Runs in: b2b-metering
  • Enable: Written into each target's .mcp.json by task mcp:profile:regenerate (or, for a b2b-metering tenant, task tenant:launch TENANT=<id>).
  • Env vars: GRAFANA_API_KEY, GRAFANA_URL
  • Auth: env credential
  • Verify: claude mcp list
  • Runbook: b2b-metering/README/mcp-readonly/MCP_SETUP_REFERENCE.md

alerting_manage_routing

Manage Grafana alerting routing configuration, including notification policies, contact points and time intervals.

Use the alerting_manage_routing tool from the grafana MCP server for my current task: Manage Grafana alerting routing configuration, including notification policies, contact points and time intervals.

alerting_manage_rules

List and inspect Grafana alert rules with filtering capabilities.

Use the alerting_manage_rules tool from the grafana MCP server for my current task: List and inspect Grafana alert rules with filtering capabilities.

alerting_manage_silences

List and inspect Grafana alerting silences. A silence temporarily suppresses notifications for alerts whose labels match a set of matchers.

Use the alerting_manage_silences tool from the grafana MCP server for my current task: List and inspect Grafana alerting silences. A silence temporarily suppresses notifications for alerts whose labels match a set of matchers.

analyze_loki_labels

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.

Use the analyze_loki_labels tool from the grafana MCP server for my current task: 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.

check_datasources_health

Check datasource health. Filter by type or UIDs; omit both to check all.

Use the check_datasources_health tool from the grafana MCP server for my current task: Check datasource health. Filter by type or UIDs; omit both to check all.

Generate 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). In read-only mode, shorten=true is accepted but ignored and the full deeplink is returned.

Use the generate_deeplink tool from the grafana MCP server for my current task: Generate 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). In read-only mode, shorten=true is accepted but ignored and the full deeplink is returned.

get_alert_group

Get a specific alert group from Grafana OnCall by its ID. Returns the full alert group details, including the most recent alert and its raw payload when the OnCall API provides them. Alert payloads carry integration-specific fingerprints (for example Sentry's payload.data.event.hashes or Alertmanager's payload.alerts[].fingerprint) that identify recurring alerts across different alert groups.

Use the get_alert_group tool from the grafana MCP server for my current task: Get a specific alert group from Grafana OnCall by its ID. Returns the full alert group details, including the most recent alert and its raw payload when the OnCall API provides them. Alert payloads carry integration-specific fingerprints (for example Sentry's payload.data.event.hashes or Alertmanager's payload.alerts[].fingerprint) that identify recurring alerts across different alert groups.

get_annotation_tags

Returns annotation tags with optional filtering by tag name. Only the provided filters are applied.

Use the get_annotation_tags tool from the grafana MCP server for my current task: Returns annotation tags with optional filtering by tag name. Only the provided filters are applied.

get_annotations

Fetch Grafana annotations using filters such as dashboard UID, time range and tags.

Use the get_annotations tool from the grafana MCP server for my current task: Fetch Grafana annotations using filters such as dashboard UID, time range and tags.

get_assertions

Get assertion summary for a given entity with its type, name, env, site, namespace, and a time range

Use the get_assertions tool from the grafana MCP server for my current task: Get assertion summary for a given entity with its type, name, env, site, namespace, and a time range.

get_current_oncall_users

Get 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.

Use the get_current_oncall_users tool from the grafana MCP server for my current task: Get 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.

get_dashboard_by_uid

Retrieves 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.

Use the get_dashboard_by_uid tool from the grafana MCP server for my current task: Retrieves 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.

get_dashboard_panel_queries

Retrieve 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, requiredVariables, and target. Targets built in a visual editor (CloudWatch metric search, InfluxDB query builder) have no string expression: those return an empty query plus target, the panel's raw query JSON. Run those with run_panel_query rather than a query tool.

Use the get_dashboard_panel_queries tool from the grafana MCP server for my current task: Retrieve 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, requiredVariables, and target. Targets built in a visual editor (CloudWatch metric search, InfluxDB query builder) have no string expression: those return an empty query plus `target`, the panel's raw query JSON. Run those with run_panel_query rather than a query tool.

get_dashboard_property

Get 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.

Use the get_dashboard_property tool from the grafana MCP server for my current task: Get 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.

get_dashboard_summary

Get 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.

Use the get_dashboard_summary tool from the grafana MCP server for my current task: Get 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.

get_datasource

Retrieves 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.

Use the get_datasource tool from the grafana MCP server for my current task: Retrieves 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.

get_doc

Fetch a Grafana documentation page. Set outline_only=true to get the heading structure first, then call again with a section name for bounded retrieval.

Use the get_doc tool from the grafana MCP server for my current task: Fetch a Grafana documentation page. Set outline_only=true to get the heading structure first, then call again with a section name for bounded retrieval.

get_incident

Get a single incident by ID. Returns the full incident details including title, status, severity, labels, custom fields, timestamps, and other metadata.

Use the get_incident tool from the grafana MCP server for my current task: Get a single incident by ID. Returns the full incident details including title, status, severity, labels, custom fields, timestamps, and other metadata.

get_oncall_shift

Get 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.

Use the get_oncall_shift tool from the grafana MCP server for my current task: Get 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.

get_panel_image

Render 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.

Use the get_panel_image tool from the grafana MCP server for my current task: Render 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.

get_plugin

Check 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.

Use the get_plugin tool from the grafana MCP server for my current task: Check 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.

get_sift_analysis

Retrieves a specific analysis from an investigation by its UUID. The investigation ID and analysis ID should be provided as strings in UUID format.

Use the get_sift_analysis tool from the grafana MCP server for my current task: Retrieves a specific analysis from an investigation by its UUID. The investigation ID and analysis ID should be provided as strings in UUID format.

get_sift_investigation

Retrieves 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').

Use the get_sift_investigation tool from the grafana MCP server for my current task: Retrieves 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').

get_snapshot

Get a Grafana snapshot by key, including snapshot metadata and dashboard payload.

Use the get_snapshot tool from the grafana MCP server for my current task: Get a Grafana snapshot by key, including snapshot metadata and dashboard payload.

grafana_api_request

Make 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. Only GET requests are allowed.

Use the grafana_api_request tool from the grafana MCP server for my current task: Make 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. Only GET requests are allowed.

list_alert_groups

List 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.

Use the list_alert_groups tool from the grafana MCP server for my current task: List 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.

list_datasources

List all configured datasources in Grafana. Use this to discover available datasources and their UIDs. Supports filtering by type and/or name (case-insensitive substring match) and pagination.

Use the list_datasources tool from the grafana MCP server for my current task: List all configured datasources in Grafana. Use this to discover available datasources and their UIDs. Supports filtering by type and/or name (case-insensitive substring match) and pagination.

list_incident_custom_fields

List the custom fields configured for Grafana incidents, including their type and, for select fields, the options that may be chosen. Use this to discover which fields exist and which values are valid before setting them with create_incident or update_incident.

Use the list_incident_custom_fields tool from the grafana MCP server for my current task: List the custom fields configured for Grafana incidents, including their type and, for select fields, the options that may be chosen. Use this to discover which fields exist and which values are valid before setting them with create_incident or update_incident.

list_incidents

List Grafana incidents. Allows filtering by status ('active', 'resolved') and optionally including drill incidents. Returns a preview list with basic details, and custom field values if requested.

Use the list_incidents tool from the grafana MCP server for my current task: List Grafana incidents. Allows filtering by status ('active', 'resolved') and optionally including drill incidents. Returns a preview list with basic details, and custom field values if requested.

list_loki_label_names

Lists 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. Optionally narrow the search to a subset of streams with matcher (e.g. {namespace="prod"}).

Use the list_loki_label_names tool from the grafana MCP server for my current task: Lists 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. Optionally narrow the search to a subset of streams with `matcher` (e.g. `{namespace="prod"}`).

list_loki_label_values

Retrieves 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. Optionally narrow the search to a subset of streams with matcher (e.g. {namespace="prod"}) — for example, to list service values seen only within a specific namespace.

Use the list_loki_label_values tool from the grafana MCP server for my current task: Retrieves 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. Optionally narrow the search to a subset of streams with `matcher` (e.g. `{namespace="prod"}`) — for example, to list `service` values seen only within a specific namespace.

list_oncall_schedules

List 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.

Use the list_oncall_schedules tool from the grafana MCP server for my current task: List 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.

list_oncall_teams

List teams configured in Grafana OnCall. Returns a list of team objects with their details. Supports pagination.

Use the list_oncall_teams tool from the grafana MCP server for my current task: List teams configured in Grafana OnCall. Returns a list of team objects with their details. Supports pagination.

list_oncall_users

List 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.

Use the list_oncall_users tool from the grafana MCP server for my current task: List 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.

list_prometheus_label_names

List label names in a PromQL-compatible datasource (Prometheus, Thanos, Mimir, Cloud Monitoring, etc.). Allows filtering by series selectors and time range.

Use the list_prometheus_label_names tool from the grafana MCP server for my current task: List label names in a PromQL-compatible datasource (Prometheus, Thanos, Mimir, Cloud Monitoring, etc.). Allows filtering by series selectors and time range.

list_prometheus_label_values

Use 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.

Use the list_prometheus_label_values tool from the grafana MCP server for my current task: Use 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.

list_prometheus_metric_metadata

List Prometheus metric metadata. Returns metadata about metrics currently scraped from targets. Note: This endpoint is experimental.

Use the list_prometheus_metric_metadata tool from the grafana MCP server for my current task: List Prometheus metric metadata. Returns metadata about metrics currently scraped from targets. Note: This endpoint is experimental.

list_prometheus_metric_names

DISCOVERY: 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.

Use the list_prometheus_metric_names tool from the grafana MCP server for my current task: DISCOVERY: 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.

list_provisioning_repositories

List 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.

Use the list_provisioning_repositories tool from the grafana MCP server for my current task: List 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.

list_pyroscope_label_names

Lists all available label names (keys) found in profiles within a specified Pyroscope datasource, time range, and

Use the list_pyroscope_label_names tool from the grafana MCP server for my current task: Lists all available label names (keys) found in profiles within a specified Pyroscope datasource, time range, and.

list_pyroscope_label_values

Lists all available label values for a particular label name found in profiles within a specified Pyroscope datasource,

Use the list_pyroscope_label_values tool from the grafana MCP server for my current task: Lists all available label values for a particular label name found in profiles within a specified Pyroscope datasource,.

list_pyroscope_profile_types

Lists all available profile types available in a specified Pyroscope datasource and time range. Returns a list of all

Use the list_pyroscope_profile_types tool from the grafana MCP server for my current task: Lists all available profile types available in a specified Pyroscope datasource and time range. Returns a list of all.

list_sift_investigations

Retrieves a list of Sift investigations with an optional limit. If no limit is specified, defaults to 10 investigations.

Use the list_sift_investigations tool from the grafana MCP server for my current task: Retrieves a list of Sift investigations with an optional limit. If no limit is specified, defaults to 10 investigations.

list_snapshots

List Grafana dashboard snapshots with optional query and result limit filters.

Use the list_snapshots tool from the grafana MCP server for my current task: List Grafana dashboard snapshots with optional query and result limit filters.

query_loki_logs

Executes 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. For broad queries that match many lines, set format to 'compact' to group results by stream and avoid repeating label metadata on every line. If this server enables the Loki cost guardrail, expensive queries are rejected before execution: query cost is bytes SCANNED, determined only by the stream selector and time range — line filters (|=) and parsers (| json) reduce what is returned, not what is scanned. Use a stream selector with at least one selective positive label matcher (never {}, =~".*"/=~".+", or negative-only matchers), keep time ranges narrow, and check size with query_loki_stats first; rejected queries return rewrite guidance.

Use the query_loki_logs tool from the grafana MCP server for my current task: Executes 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. For broad queries that match many lines, set `format` to 'compact' to group results by stream and avoid repeating label metadata on every line. If this server enables the Loki cost guardrail, expensive queries are rejected before execution: query cost is bytes SCANNED, determined only by the stream selector and time range — line filters (|=) and parsers (| json) reduce what is returned, not what is scanned. Use a stream selector with at least one selective positive label matcher (never `{}`, `=~".*"`/`=~".+"`, or negative-only matchers), keep time ranges narrow, and check size with `query_loki_stats` first; rejected queries return rewrite guidance.

query_loki_patterns

Retrieves 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.

Use the query_loki_patterns tool from the grafana MCP server for my current task: Retrieves 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.

query_loki_stats

Retrieves 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.

Use the query_loki_stats tool from the grafana MCP server for my current task: Retrieves 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.

query_prometheus

WORKFLOW: 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'.

Use the query_prometheus tool from the grafana MCP server for my current task: WORKFLOW: 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'.

query_prometheus_histogram

Query Prometheus histogram percentiles. DISCOVER FIRST: Use list_prometheus_metric_names with regex='.*_bucket$' to find histograms.

Use the query_prometheus_histogram tool from the grafana MCP server for my current task: Query Prometheus histogram percentiles. DISCOVER FIRST: Use list_prometheus_metric_names with regex='.*_bucket$' to find histograms.

query_pyroscope

Unified Pyroscope query tool for fetching profiles or metrics from Pyroscope. Profile data shows WHICH functions consume resources; metrics data

Use the query_pyroscope tool from the grafana MCP server for my current task: Unified Pyroscope query tool for fetching profiles or metrics from Pyroscope. Profile data shows WHICH functions consume resources; metrics data.

search_dashboards

Search Grafana dashboards by query and/or folderUid, tag, and starred. Returns matching dashboards with title, UID, folder, tags, and URL.

Use the search_dashboards tool from the grafana MCP server for my current task: Search Grafana dashboards by query and/or folderUid, tag, and starred. Returns matching dashboards with title, UID, folder, tags, and URL.

search_docs

Search Grafana documentation. Returns matching pages with title, URL, description, and product. Call with no query to list available product groups.

Use the search_docs tool from the grafana MCP server for my current task: Search Grafana documentation. Returns matching pages with title, URL, description, and product. Call with no query to list available product groups.

search_folders

Search for Grafana folders by a query string. Returns matching folders with details like title, UID, and URL.

Use the search_folders tool from the grafana MCP server for my current task: Search for Grafana folders by a query string. Returns matching folders with details like title, UID, and URL.

search_plugin_information

Search 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.

Use the search_plugin_information tool from the grafana MCP server for my current task: Search 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.

suggest_loki_alloy_label_config

Generates an Alloy loki.process snippet enforcing an approved label set via stage.label_keep, with optional log-level normalisation and soft-enforcement placeholders.

Use the suggest_loki_alloy_label_config tool from the grafana MCP server for my current task: Generates an Alloy loki.process snippet enforcing an approved label set via stage.label_keep, with optional log-level normalisation and soft-enforcement placeholders.

user_info

Get information about the current Grafana identity: login, email, name, whether it is a Grafana (server) admin, the current organization, and the organizations it can access (with roles). Call this to discover which orgId values are valid before targeting a specific organization, and to understand the identity's capabilities.

Use the user_info tool from the grafana MCP server for my current task: Get information about the current Grafana identity: login, email, name, whether it is a Grafana (server) admin, the current organization, and the organizations it can access (with roles). Call this to discover which orgId values are valid before targeting a specific organization, and to understand the identity's capabilities.

validate_provisioning_file

Validate 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.

Use the validate_provisioning_file tool from the grafana MCP server for my current task: Validate 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.