Run an ES|QL query
esqlRun ES|QL queries on Elasticsearch to filter, aggregate, and sort data. Returns results with column metadata and row objects.
Instructions
Run an ES|QL (Elasticsearch Query Language) query and return the result as column metadata plus row objects. Good for filtering, STATS aggregations, and sorting expressed as a piped query string, e.g. FROM idx | WHERE status == "open" | STATS count = COUNT(*) BY host | SORT count DESC. Requires Elasticsearch 8.11+.
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": {
"query": "<query>"
},
"name": "esql"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The complete ES|QL query string, e.g. `FROM my-index | LIMIT 10` |