KosmoKrator

other

Elastic CLI for Coding Agents

Use the Elastic CLI for coding agents with headless JSON commands, schema discovery, credentials, and permission controls.

7 functions 5 read 2 write Username and password auth

Elastic CLI for Coding Agents

Let coding agents discover schemas and execute integration functions through CLI commands or MCP.

Use this pattern when another coding agent needs exact commands and schema discovery. The Elastic CLI uses the same integration registry as the TUI, Lua runtime, and MCP gateway, but returns predictable command output for automation.

Command Shape

# Elastic CLI for Coding Agents
kosmokrator integrations:configure elastic --enable --read allow --write ask --json
kosmo integrations:call elastic.elastic_list_indices '{}' --json

Discovery Before Execution

Agents and scripts can inspect Elastic docs and schemas before choosing a function.

kosmo integrations:docs elastic --json
kosmo integrations:docs elastic.elastic_list_indices --json
kosmo integrations:schema elastic.elastic_list_indices --json
kosmo integrations:search "Elastic" --json
kosmo integrations:list --json

Useful Elastic CLI Functions

FunctionTypeParametersDescription
elastic.elastic_list_indices Read none List all indices in the Elasticsearch cluster. Returns index names, health status, document counts, and sizes.
elastic.elastic_get_index Read index Get detailed information about a specific Elasticsearch index, including mappings, settings, and aliases.
elastic.elastic_create_index Write index, settings Create a new Elasticsearch index with optional settings and mappings.
elastic.elastic_search_documents Read index, query, size, from Search for documents in an Elasticsearch index. Supports full query DSL including match, term, bool, and aggregation queries.
elastic.elastic_index_document Write index, document, id Create or update a document in an Elasticsearch index. Provide an ID to update an existing document, or omit it to let Elasticsearch auto-generate one.
elastic.elastic_get_document Read index, id Retrieve a single document from an Elasticsearch index by its ID.
elastic.elastic_cluster_health Read none Get the health status of the Elasticsearch cluster, including status (green/yellow/red), number of nodes, and shard information.

Automation Notes

Related Elastic CLI Pages