Ready to connect
Connects with credentials the end user enters, such as an API key, so you don’t need to register an OAuth app.
Authentication: service account token. See Magic Link for the runtime auth flow.
Sample use cases
- Show me dashboards owned by the
payments team and surface any with no panels updated in 90 days.
- Pull the alert rules that fired in the last 24 hours, grouped by severity.
- Find dashboards with broken panels (data source unreachable).
Limit which data sources agents can read
Open-source Grafana has no per-data-source permissions, so a service account token that can query one data source can query all of them. To keep agents away from some of them, such as a log store, enter a comma-separated list of data source UIDs in Allowed data source UIDs when you connect, for example prometheus-main,postgres-billing. A data source’s UID is the last segment of its URL under Connections → Data sources. Leave the field blank to allow every data source.
With the list set, list_datasources returns only the allowed data sources, and query_datasource, get_datasource, check_datasource_health, call_datasource_resource, and delete_datasource refuse any other UID. Alert tools follow the same boundary: list_alert_instances and list_alert_rule_states show only rules that query allowed data sources, create_alert_rule and update_alert_rule refuse rules over any other source, and list_alert_history requires a rule_uid. list_annotations omits alert state-change annotations, because they identify the rule only by a numeric ID the connector cannot check.
Agent Handler refuses update_datasource, create_contact_point, and update_contact_point on a limited connection, and create_datasource refuses a caller-chosen uid. Repointing an allowed UID would expose a blocked data source, and alert notifications carry query values from every rule.
list_alert_rules
List all Grafana alert rules. Returns rule UIDs, titles, conditions, and folder assignments.
get_alert_rule
Get a Grafana alert rule by UID. Returns the full rule configuration. Use list_alert_rules to find valid UIDs.
create_alert_rule
Create a Grafana alert rule. Requires title, condition, data queries, folder_uid, and rule_group.
update_alert_rule
Update a Grafana alert rule by UID. Requires all fields (title, condition, data, folder_uid, rule_group).
delete_alert_rule
Delete a Grafana alert rule by UID. This action is permanent. Use list_alert_rules to find valid UIDs.
list_contact_points
List all Grafana alerting contact points. Returns names, types (email, slack, webhook, etc.), and UIDs.
create_contact_point
Create a Grafana alerting contact point.
update_contact_point
Update a Grafana alerting contact point by UID.
delete_contact_point
Delete a Grafana alerting contact point by UID. This action is permanent. Use list_contact_points to find valid UIDs.
list_annotations
List Grafana annotations filtered by time range, tags, or dashboard.
create_annotation
Create a Grafana annotation. Annotations mark events on dashboards.
update_annotation
Update a Grafana annotation by ID. Supports partial updates (only changed fields needed).
delete_annotation
Delete a Grafana annotation by ID. This action is permanent. Use list_annotations to find valid IDs.
search_dashboards
Search Grafana dashboards by query, tags, or folder. Returns paginated results. Use page from page_info for next page.
get_dashboard
Get a Grafana dashboard by UID. Returns the full dashboard model with panels, variables, and metadata.
create_dashboard
Create a new Grafana dashboard. Provide a dashboard object with ‘title’ and ‘id’ set to null.
update_dashboard
Update an existing Grafana dashboard. The dashboard object must include ‘uid’ and ‘title’.
delete_dashboard
Delete a Grafana dashboard by UID. This action is permanent. Use search_dashboards to find valid UIDs.
list_datasources
List Grafana data sources. Returns names, types, UIDs, and connection details.
get_datasource
Get a Grafana data source by UID. Returns full configuration details. Use list_datasources to find valid UIDs.
create_datasource
Create a new Grafana data source. Common types: ‘prometheus’, ‘loki’, ‘elasticsearch’, ‘influxdb’, ‘graphite’, ‘mysql’, ‘postgres’.
update_datasource
Update an existing Grafana data source by numeric ID.
delete_datasource
Delete a Grafana data source by UID. This action is permanent. Use list_datasources to find valid UIDs.
list_folders
List all Grafana folders. Folders organize dashboards. Returns folder UIDs, titles, and URLs.
get_folder
Get a Grafana folder by UID. Returns folder details including version. Use list_folders to find valid UIDs.
create_folder
Create a new Grafana folder for organizing dashboards. Optionally specify a custom UID.
update_folder
Update a Grafana folder’s title. Include version for conflict detection. Use get_folder to find the current version.
delete_folder
Delete a Grafana folder and all its dashboards. This action is permanent. Use list_folders to find valid UIDs.
get_org
Get the current Grafana organization info. Returns organization name and ID.
list_org_users
List all users in the current Grafana organization. Returns user IDs, logins, emails, and roles (Admin, Editor, Viewer).
get_current_user
Get the currently authenticated Grafana user. Returns user ID, login, email, name, and admin status.
search_teams
Search Grafana teams by name or query. Returns paginated results with member counts.
get_team
Get a Grafana team by ID. Returns team name, email, and member count. Use search_teams to find valid IDs.
create_team
Create a new Grafana team. Optionally set a team email. Use add_team_member to add members after creation.
update_team
Update a Grafana team’s name or email. Use search_teams to find valid IDs.
delete_team
Delete a Grafana team by ID. This action is permanent. Use search_teams to find valid IDs.
list_team_members
List members of a Grafana team. Returns user IDs, logins, emails, and names. Use search_teams to find valid team IDs.
add_team_member
Add a user to a Grafana team. Use list_org_users to find valid user IDs and search_teams for team IDs.
remove_team_member
Remove a user from a Grafana team. Use list_team_members to find valid user IDs for the team.
call_datasource_resource
Discover what a Grafana data source can be queried for: metric names, label names, and label values.
check_datasource_health
Check whether a Grafana data source is reachable and its stored credentials work.
list_alert_history
Get state-change history for Grafana alert rules over a time range: when a rule moved to firing, normal, or error, and why.
list_alert_instances
List Grafana alert instances that are currently firing, silenced, or inhibited, with their labels, annotations, and start times.
list_alert_rule_states
List Grafana alert rules with their current evaluation state and health, grouped by rule group.
query_datasource
Query a Grafana data source for the actual metric, log, or SQL data behind dashboards.