Elasticsearch MCP integration for AI agents.
Connect AI agents to Elasticsearch through 21 structured actions, including count documents, create index, delete by query, and bulk index documents. Review…
- ACTION CONTRACTS
- 21
- AUTHENTICATION
- API key + Custom credentials
- SOURCE STATUS
- Provider-backed
CATALOG SOURCE REVIEWED AUGUST 23, 2026 / ACTION NAMES AND SCHEMAS DERIVED FROM WORKING MACHINES PROVIDER SOURCE
CAPABILITY PROFILE
What the Elasticsearch integration exposes
The Elasticsearch Agent App exposes 21 provider-backed actions for data and developer tools work. Its current contract lets an authorized agent count elasticsearch documents matching a query without returning any hits, which is cheaper than a search when only the size of a result set matters, create one elasticsearch index with explicit mappings, settings, and aliases, and delete elasticsearch documents matching a query. this destroys data and cannot be undone, so a bounded maxdocs and at least one of query, termfilters, rangefilters, or timefilter are required, the index name must be exact, and _all is rejected. that makes it impossible to empty an entire index by accident. the action waits for the deletion to finish, and a large maxdocs can outlast that wait: a timeout does not cancel the deletion, which keeps running on the cluster with no task id to poll, so a retry after a timeout deletes a further batch. These operations are called through Working Machines as typed capabilities rather than through browser navigation or copied UI steps.
A connection uses API key and Custom credentials. Before execution, the agent can inspect the selected action, its required fields, declared scopes, and expected output contract. Provider credentials remain inside the Working Machines runtime; the calling agent receives the capability and its structured result, not the underlying secret.
For reliable operation, start with the narrowest action that satisfies the task, resolve stable provider identifiers before changing state, and validate the returned object or status after execution. Availability still depends on the connected Elasticsearch account, granted provider permissions, workspace policy, region, plan, and upstream API behavior.
VERIFIED ACTION SAMPLE
Real Elasticsearch capabilities.
Showing 12 of 21 actions. Risk labels are conservative signals based on operation names, not substitutes for provider documentation or runtime policy.
count_documentsREADCount Elasticsearch documents matching a query without returning any hits, which is cheaper than a search when only the size of a result set matters.
INPUTS: indexName / query / termFilters / rangeFilters / timeFilter
create_indexWRITECreate one Elasticsearch index with explicit mappings, settings, and aliases.
INPUTS: indexName / mappings / settings / aliases
delete_by_queryHIGH IMPACTDelete Elasticsearch documents matching a query. This destroys data and cannot be undone, so a bounded maxDocs and at least one of query, termFilters, rangeFilters, or timeFilter are required, the index name must be exact, and _all is rejected. That makes it impossible to empty an entire index by accident. The action waits for the deletion to finish, and a large maxDocs can outlast that wait: a timeout does not cancel the deletion, which keeps running on the cluster with no task id to poll, so a retry after a timeout deletes a further batch.
INPUTS: indexName / maxDocs / query / termFilters / rangeFilters
bulk_index_documentsREVIEWApply many Elasticsearch document writes in one bulk request. Each operation names its own index, and per-operation failures are reported in the response instead of failing the whole request.
INPUTS: operations / refresh
delete_documentHIGH IMPACTDelete one Elasticsearch document by id. A missing document returns a not_found result instead of raising an error.
INPUTS: indexName / documentId / refresh
delete_indexHIGH IMPACTPermanently delete one or more Elasticsearch indices by exact name. This destroys data and cannot be undone, so wildcards, comma-separated lists, and _all are rejected, and expectedCount must equal the number of names supplied.
INPUTS: indices / expectedCount / ignoreUnavailable
get_cluster_healthREADGet detailed Elasticsearch cluster health including shard counts and an optional per-index breakdown.
INPUTS: index / level
get_cluster_nodesREADList Elasticsearch cluster nodes with uptime, heap, disk, and role information. Node uptime is what makes the cumulative counters from get_index_stats interpretable.
get_documentREADGet one Elasticsearch document by id. A missing document returns found as false instead of raising an error.
INPUTS: indexName / documentId / fields
get_index_schemaREADGet mappings, settings, aliases, and field statistics for one Elasticsearch index.
INPUTS: indexName
get_index_statsREADGet document, store, search, get, and indexing statistics for Elasticsearch indices. Counters such as searchQueryTotal are cumulative since each node started rather than a time window, so compare them against the node uptime in counterWindow before concluding that a zero means the index is never queried.
INPUTS: index / includeCounterWindow
get_taskREADGet the state and progress of one Elasticsearch task, such as a reindex started by the reindex action.
INPUTS: taskId
INPUT CONTRACTS
Know what the action needs before it runs.
count_documents
indexNameREQUIRED- The index or index pattern to count documents in.
queryOPTIONAL- A free-text query_string query.
termFiltersOPTIONAL- Exact term filters for specific field values.
rangeFiltersOPTIONAL- Range filters for fields.
timeFilterOPTIONAL- A time-based range filter for timestamp fields.
create_index
indexNameREQUIRED- The exact name of the index to create.
mappingsOPTIONAL- The mapping definition for the new index, such as a properties object.
settingsOPTIONAL- The index settings for the new index, such as number_of_shards and number_of_replicas.
aliasesOPTIONAL- The aliases to attach to the new index, keyed by alias name.
delete_by_query
indexNameREQUIRED- The exact index to delete documents from. Wildcards, comma-separated lists, and _all are rejected.
maxDocsREQUIRED- The maximum number of documents this request may delete. Elasticsearch stops once the limit is reached.
queryOPTIONAL- A free-text query_string query.
termFiltersOPTIONAL- Exact term filters for specific field values.
rangeFiltersOPTIONAL- Range filters for fields.
bulk_index_documents
operationsREQUIRED- The document writes to apply in order.
refreshOPTIONAL- Whether to refresh the affected shards before returning: true refreshes immediately, wait_for waits for the next scheduled refresh, and false skips refreshing.
PROVIDER-SPECIFIC WORKFLOWS
Jobs this Agent App can support
Inspect Count Documents
Count Elasticsearch documents matching a query without returning any hits, which is cheaper than a search when only the size of a result set matters. Use this as a bounded discovery step, retain the returned identifier, and avoid expanding the read beyond the task's stated scope.
count_documentsControl Create Index
Create one Elasticsearch index with explicit mappings, settings, and aliases. Resolve the target first, present material changes for confirmation, and make retries idempotent where the provider supports it.
create_indexVerify with Get Cluster Health
Get detailed Elasticsearch cluster health including shard counts and an optional per-index breakdown. Compare the returned provider state with the intended outcome and preserve stable IDs or canonical links in the run record.
get_cluster_healthSAFETY BOUNDARY
Operate Elasticsearch with explicit limits
- Authorize Elasticsearch with API key and Custom credentials and grant only the provider access required by the selected actions.
- 6 actions are change-capable by name. Confirm the target identity and material parameters before allowing a write.
- Treat `delete_by_query`, `delete_document`, and `delete_index` as high-impact operations and require an explicit approval boundary.
- No provider scope string is declared on the sampled actions. Verify the connected account's actual permissions in Elasticsearch rather than assuming unrestricted access.
- After a call, inspect the structured result and execution record before reporting that the Elasticsearch task completed successfully.
CONNECTION MODEL
API key + Custom credentials
Elasticsearch encoded API key sent with the Authorization: ApiKey header.
Working Machines stores provider credentials behind the execution boundary. An agent can use an authorized connection identity, but catalog discovery alone does not reveal OAuth tokens, API keys, or provider secrets.
- READ SIGNALS
- 11
- WRITE SIGNALS
- 3
- HIGH IMPACT
- 3
- REVIEW SIGNALS
- 4
EVIDENCE AND AVAILABILITY
Provider reference
Action names, input fields, authentication types, and counts on this page are generated from the Working Machines provider catalog. Provider behavior, quotas, object semantics, account eligibility, and regional availability remain governed by Elasticsearch.