com um clique
grafana-dashboard
// Create, view, and manage Grafana dashboards with panels and datasources
// Create, view, and manage Grafana dashboards with panels and datasources
Create database tables from SQL (CTAS) or natural language descriptions
Generate MetricFlow metrics from natural language business descriptions
Generate MetricFlow semantic models from database tables with validation and Knowledge Base publishing
Activate when the gen_job agent detects that the source and target databases differ. Covers cross-database transfer lifecycle - type mapping via adapter Mixin hints, DDL generation, data transfer via transfer_query_result, and lightweight reconciliation.
Execution guide for Airflow scheduled jobs — troubleshooting, updating, conn_id conventions, and cron references
Scheduler validator driven by ValidationHook — read-only static verification of scheduled jobs (schedule correctness, configuration, runtime context already collected by deterministic hook). Does not trigger test runs.
| name | grafana-dashboard |
| description | Create, view, and manage Grafana dashboards with panels and datasources |
| tags | ["grafana","dashboard","BI","visualization"] |
| version | 2.0.0 |
| user_invocable | false |
| disable_model_invocation | false |
| allowed_agents | ["gen_dashboard"] |
Use this skill to create, update, or inspect dashboards in Grafana.
The data you need is already in a table inside a Grafana datasource
database — gen_dashboard does not move data. Your job: build panels against
that table, assemble the dashboard, validate.
dashboard_id is required for create_chart.dataset_db config.update_chart is not supported — delete and recreate the panel instead.Follow these steps in order.
Grafana does not expose list_bi_databases. Use get_bi_serving_target() when
available to confirm the configured serving datasource, or proceed with the
configured dataset_db.bi_database_name; create_chart resolves the Grafana
datasource automatically. If the datasource cannot be resolved, bail with a
structured error. Do NOT try to auto-provision.
Before calling create_dashboard or create_chart, make an internal layout
plan. Do not expose a long plan to the user unless asked, but use it to decide
the panel count, panel order, row grouping, and expected size before any
dashboard or panel write calls.
The layout plan must include:
If the user provides a row-by-row layout, normalize it against these rules before creating resources. Avoid blindly creating one row per panel when panels can share a row.
create_dashboard)Create the dashboard first — Grafana requires dashboard_id to add panels.
create_dashboard(title="Dashboard Title", description="Optional description")
Returns dashboard_id — save it for Step 4.
create_chart)Create panels with SQL that queries the existing table in the Grafana-registered datasource.
create_chart(
chart_type="line", # bar, line, pie, table, big_number, scatter
title="Chart Title",
sql="SELECT date_col AS time, value_col FROM target_table ORDER BY date_col",
dashboard_id="<from step 2>"
)
CRITICAL RULES for the sql parameter:
time (e.g., SELECT date_col AS time, ...).SELECT date AS "Date", count AS "Count").ORDER BY for time series data.Repeat Step 3 for each chart. All panels use the same dashboard_id.
Create panels in this visual order because Grafana appends panels to the dashboard in creation order:
big_number panels for headline totals, rates, averages, or sums.line panels over a real time column.bar panels for top categories, statuses, teams, or owners.pie only for fewer than 7 categories and exactly one metric.table panel only when users need row-level inspection.For high-cardinality categories, write SQL that ranks or limits the result to the top 10-15 values. Avoid one panel per column. Do not use a fixed panel count; include the panels needed to answer distinct business questions, then stop. Keep panel titles short and business-facing, and put units in aliases or descriptions when useful.
If a chart needs a different data shape and the table isn't available, stop and return a structured error listing the missing table. The caller must prepare or refresh that data separately before retrying.
After creating the dashboard and panels, finish the run and return the created
IDs. bi-validation is a validator skill invoked automatically by
ValidationHook.on_end; do not call load_skill("bi-validation") or try to
run validator checks manually.
Publish is complete when the creation calls succeed and the dashboard / panel identifiers are known. The framework validates reachability and wiring after the agent run ends.
| Action | Tool | Notes |
|---|---|---|
| List dashboards | list_dashboards(search="keyword") | Filter by keyword |
| Get dashboard details | get_dashboard(dashboard_id="...") | Full info including panels |
| List charts in dashboard | list_charts(dashboard_id="...") | All panels with SQL |
| Get chart details | get_chart(chart_id="...", dashboard_id="...") | Full panel metadata; dashboard_id required in Grafana |
| List datasources | list_datasets() | Grafana datasources |
update_dashboard(dashboard_id, title="New Title", description="New desc")MUST confirm with user before any deletion.
delete_dashboard(dashboard_id="...")delete_chart(chart_id="...")gen_job or scheduler before retrying dashboard creation.create_chart(sql=...).dashboard_id is required for create_chart — create the dashboard before creating charts.time for Grafana to recognize it.SELECT COUNT(*) AS value FROM table.