Grafana
Connects to a Grafana instance's HTTP API. An agent can search dashboards, list alerts and data sources, link to panels, and create annotations.
Add to an agent node's tools array with _node_type: "tool-grafana". See Connector Reference — How connectors are used.
Authentication
| Field | Required | Description |
|---|---|---|
base_url | Yes | Base URL of the Grafana instance (e.g. https://grafana.example.com). |
api_key | No | Grafana service account token, sent as Authorization: Bearer <api_key>. |
{
"name": "grafana",
"_node_type": "tool-grafana",
"base_url": "https://grafana.example.com",
"api_key": "{{ secret.GRAFANA_API_KEY }}"
}
Tools
grafana_list_dashboards
List Grafana dashboards with their UIDs and folder.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
query | string | No | Search query for dashboard titles |
Returns: A newline-separated list of uid=<uid> <title> lines.
grafana_query_panel
Get a direct link to a Grafana dashboard panel with a time range.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
dashboard_uid | string | Yes | Dashboard UID |
panel_id | number | Yes | Panel ID |
from | string | No | Start time e.g. now-1h (default now-1h) |
to | string | No | End time e.g. now (default now) |
Returns: A single line: Panel link: <base_url>/d/<dashboard_uid>?panelId=<panel_id>&from=<from>&to=<to>. (Constructed locally; does not call the Grafana API.)
grafana_list_alerts
List Grafana alerts and their current state.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
state | string | No | Filter by state: alerting, ok, no_data, pending (empty = all) |
Returns: A newline-separated list of [<state>] <name> lines, or "No alerts found.". Falls back to the unified alerting /api/v1/provisioning/alert-rules endpoint if the legacy /api/alerts endpoint fails.
grafana_create_annotation
Create a Grafana annotation (vertical marker on dashboards) to mark deployments or incidents.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | string | Yes | Annotation text |
tags | string | No | Comma-separated tags |
time | number | No | Unix timestamp in milliseconds (0 = now) |
Returns: A confirmation message: Annotation created (id=<id>): <text>.
grafana_list_datasources
List all Grafana data sources configured in the instance.
No parameters.
Returns: A newline-separated list of [<id>] <name> type=<type> lines.