Back to Genai Toolbox

elasticsearch-execute-esql

docs/en/integrations/elasticsearch/tools/elasticsearch-execute-esql.md

1.1.01.9 KB
Original Source

About

Execute arbitrary ES|QL statements.

This tool allows you to execute arbitrary ES|QL statements against your Elasticsearch cluster at runtime. This is useful for ad-hoc queries where the statement is not known beforehand.

See the official documentation for more information.

Compatible Sources

{{< compatible-sources >}}

Parameters

nametyperequireddescription
querystringtrueThe ES

Example

yaml
kind: tool
name: execute_ad_hoc_esql
type: elasticsearch-execute-esql
source: elasticsearch-source
description: Use this tool to execute arbitrary ES|QL statements.
format: json

Reference

fieldtyperequireddescription
typestringtrueMust be "elasticsearch-execute-esql".
sourcestringtrueName of the source the ES
descriptionstringtrueDescription of the tool that is passed to the LLM.
formatstringfalseThe format of the query. Default is json. Valid values are csv, json, tsv, txt, yaml, cbor, smile, or arrow.