Add Esql Metric Panel
add_esql_metric_panelAdd an ES|QL metric panel to an existing Kibana dashboard by running a query and showing a chosen output column as a single-number metric. Use it for query-based KPI panels.
Instructions
Add an ES|QL metric panel to an existing dashboard: run an ES|QL
query and show one of its output columns as a single-number metric.
esql is the query (e.g. 'FROM logs | STATS total = COUNT(*)') and
column names the output column to display (e.g. 'total'). For
field-based charts use add_panel with a VizSpec instead. The query is
NOT validated server-side — a wrong query or column yields an empty
panel, so write both carefully. dashboard_id comes from search_dashboards.
space targets a Kibana space by id (default: the default space).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"dashboard_id": "<dashboard_id>",
"title": "<title>",
"esql": "<esql>",
"column": "<column>"
},
"name": "add_esql_metric_panel"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| esql | Yes | ||
| space | No | ||
| title | Yes | ||
| column | Yes | ||
| dashboard_id | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||