Skip to main content
Glama
bpamiri

elasticsearch-mcp

by bpamiri

elasticsearch-mcp

An MCP (Model Context Protocol) server for Elasticsearch clusters. Enables AI assistants like Claude to search, analyze, and interact with Elasticsearch through natural language.

PyPI version Python 3.10+ License: Apache-2.0

Features

  • Natural Language Search: Ask Claude about your data in plain English

  • Index Discovery: Explore indices, mappings, and field types

  • Search & Aggregations: Full Query DSL and aggregation support

  • Document Operations: Read, index, update, and delete documents

  • Data Export: Export search results to JSON or CSV

  • Knowledge Persistence: Claude remembers what it learns about your cluster

  • Safety Controls: Read-only mode, index blocking, result limits

  • Connection Watchdog: Automatic recovery from hung connections

  • OAuth Integration: Deploy as a Claude.ai Custom Connector with SSO

Related MCP server: otel-mcp-server

Quick Start

1. Install

pip install elasticsearch-mcp

2. Configure Claude Desktop

Edit your Claude Desktop config file:

macOS: ~/Library/Application Support/Claude/claude_desktop_config.json Windows: %APPDATA%\Claude\claude_desktop_config.json

{
  "mcpServers": {
    "elasticsearch": {
      "command": "elasticsearch-mcp",
      "env": {
        "ES_HOST": "https://your-cluster.es.example.com:9200",
        "ES_API_KEY": "your-api-key",
        "ES_READ_ONLY": "true"
      }
    }
  }
}

3. Restart Claude Desktop

Quit and reopen Claude Desktop. You'll see a hammer icon indicating tools are available.

4. Start Chatting

Ask Claude about your Elasticsearch data:

"What indices are available?"

"Search for errors in the logs index from the last hour"

"Show me the top 10 users by request count"

"Describe the mappings for the customers index"

Documentation

Guide

Description

Installation

Complete installation guide

Configuration

All configuration options

Tools Reference

Detailed tool documentation

Usage Examples

Common usage patterns

OAuth Setup

Claude.ai integration with SSO

Available Tools

Connection & Cluster

Tool

Description

connect

Connect to the cluster

disconnect

Close connections

cluster_health

Get cluster health status

cluster_info

Get cluster version and info

Index Operations

Tool

Description

list_indices

List all indices

describe_index

Get index mappings and settings

get_index_stats

Get index statistics

Search & Query

Tool

Description

search

Execute Query DSL search

search_simple

Simple query string search

count

Count matching documents

get_document

Get document by ID

Aggregations

Tool

Description

aggregate

Run aggregation queries

terms_aggregation

Quick terms aggregation

date_histogram

Time-based aggregations

Document Operations

Tool

Description

index_document

Create/update document

update_document

Partial document update

delete_document

Delete document

Export & Knowledge

Tool

Description

export_to_json

Export results to JSON

export_to_csv

Export results to CSV

save_knowledge

Save learned information

get_all_knowledge

Retrieve saved knowledge

Configuration

Required Variables

Variable

Description

ES_HOST

Elasticsearch host URL

Authentication (choose one)

Variable

Description

ES_API_KEY

API key authentication

ES_USERNAME + ES_PASSWORD

Basic authentication

ES_CLOUD_ID

Elastic Cloud ID

Safety Settings

Variable

Default

Description

ES_READ_ONLY

false

Block all write operations

ES_MAX_RESULTS

1000

Maximum results per query

ES_BLOCKED_INDICES

.security*,...

Indices to hide

Deployment Modes

Local (Default)

elasticsearch-mcp

HTTP/SSE Server

elasticsearch-mcp --http --host 0.0.0.0 --port 8080

Streamable HTTP (Claude.ai)

elasticsearch-mcp --streamable-http --host 0.0.0.0 --port 8080

Development

# Clone repository
git clone https://github.com/bpamiri/elasticsearch-mcp.git
cd elasticsearch-mcp

# Install with dev dependencies
pip install -e ".[dev]"

# Run tests
pytest

# Lint and format
ruff check .
ruff format .

# Type check
mypy src/

Security

  • API keys and passwords are never logged

  • Configurable index blocklist

  • Optional read-only mode

  • Result size limits

  • Query validation

License

Apache-2.0. See LICENSE for details.

Available Tools

18 tools
aggregateB

Execute an aggregation query.

Args: index: Index to aggregate. aggs: Aggregation definition (e.g., {"status_count": {"terms": {"field": "status"}}}). query: Optional query to filter documents before aggregating.

Returns: Aggregation results with buckets and metrics.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYes
aggsYes
queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.2/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are present, so the description must carry the full burden. It does not disclose whether the operation is read-only, requires permissions, or has any side effects, leaving significant behavioral gaps.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise, well-structured with 'Args' and 'Returns' sections, and front-loaded with the core purpose. Every sentence is informative without unnecessary elaboration.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the existence of sibling tools and the presence of an output schema, the description adequately covers parameters and return. However, it could be more complete by mentioning supported aggregation types or noting it is the general-purpose aggregation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description provides meaningful explanations for all three parameters, including an example for 'aggs' and optional nature of 'query'. This adds value beyond the schema, which only provides types and titles.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it executes an aggregation query, specifying the verb and resource. However, it does not distinguish from sibling tools like terms_aggregation or date_histogram, which are more specific aggregation tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus alternatives such as search, count_docs, or specific aggregation tools. The description lacks any 'when-to-use' or 'when-not-to-use' information.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

cluster_healthA

Get the health status of the Elasticsearch cluster.

Returns: Cluster health including status (green/yellow/red), nodes, and shards.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries full burden. It implies a read-only operation but does not explicitly state it is non-destructive, or disclose authentication needs, rate limits, or other behavioral traits. The description is minimal beyond the return values.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Two sentences: the first states the purpose, the second lists returned attributes. No unnecessary words; front-loaded with the core action.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and an existing output schema, the description covers the main return fields. However, it could be more complete by noting the format or meaning of health status values (green/yellow/red) although it does mention them. For a simple health check, it is largely sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, so the description need not add parameter details. It does add meaning by specifying what fields are returned (status, nodes, shards), which is helpful. Baseline for 0 params is 4.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Get') and resource ('health status of the Elasticsearch cluster'), and defines the return fields (status green/yellow/red, nodes, shards). It distinguishes from siblings like cluster_info and cluster_stats by focusing specifically on health status.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool versus similar siblings (e.g., cluster_info, cluster_stats). There is no mention of when not to use it or any prerequisites.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

cluster_infoA

Get cluster version and information.

Returns: Cluster name, version, build info, and compatibility versions.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description must cover behavioral traits. It states the tool reads cluster information, which is safe, but fails to mention any authentication needs, rate limits, or side effects. Minimal but not misleading.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two sentences with no filler. The first sentence states the action, and the second lists what is returned. Front-loaded and efficient.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a parameterless tool returning basic cluster info, the description is complete. It lists all relevant return fields, and with an output schema present, the agent has full understanding.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The tool has no parameters, so the schema coverage is 100% by default. The description adds value by enumerating the return fields, compensating for the lack of parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it retrieves cluster version and information, listing specific return fields (name, version, build info, compatibility versions). It is distinct from sibling tools like cluster_health and cluster_stats, which focus on different aspects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives like cluster_health or cluster_stats. The context implies it is for general cluster meta-info, but no exclusion criteria or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

cluster_statsA

Get cluster-wide statistics.

Returns: Aggregated statistics for indices and nodes across the cluster.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden. It does not disclose whether the operation is read-only, requires authentication, or any side effects. It only states it returns aggregated statistics, lacking behavioral context.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with two sentences, front-loading the purpose and providing immediate clarity with no wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and the presence of an output schema, the description is adequate but could benefit from more specificity about which statistics are included. However, it is sufficiently complete for basic usage.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

There are no parameters, so the baseline score is 4. The description adds no parameter-specific information since none are needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and the resource 'cluster-wide statistics', and specifies it returns aggregated statistics for indices and nodes. This differentiates it from siblings like cluster_health and cluster_info.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for retrieving general cluster statistics but provides no explicit guidance on when to use it versus alternatives like cluster_health or cluster_info. No exclusions or alternatives are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

connectA

Connect to the Elasticsearch cluster.

Uses configuration from environment variables (ES_HOST, ES_API_KEY, etc.).

Returns: Connection status and cluster information.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.6/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden for behavioral disclosure. It only states the tool connects and returns status, but omits important traits such as idempotency, error handling (e.g., failure if already connected), or authentication requirements.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is short (three sentences) and structured into purpose, usage, and return sections. It avoids redundancy, though it could be slightly more compact by combining the first two lines.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (no parameters, output schema present), the description covers the essential purpose and usage. However, it lacks contextual completeness for an AI agent, such as noting that connection must precede other operations, or specifying the output schema details.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, so schema coverage is 100%. The description adds value by explaining that configuration comes from environment variables, which is beyond the schema and helps the agent understand how to prepare the context.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Connect to the Elasticsearch cluster,' using a specific verb and resource. It uniquely identifies the tool as the connection establisher, distinguishing it from siblings like 'disconnect' and other query/management tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions using environment variables (ES_HOST, ES_API_KEY) for configuration, implying prerequisites. However, it lacks explicit guidance on when to use this tool (e.g., before any other Elasticsearch operations) and does not mention alternatives or when not to use it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

count_docsA

Count documents matching a query.

Args: index: Index to count. query: Optional query to filter documents.

Returns: Document count.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYes
queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, and the description does not disclose any behavioral traits beyond the basic action. It does not mention whether the count is exact or approximate, or any side effects, leaving the agent uninformed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise, with a clear one-line summary followed by structured Args/Returns sections. Every sentence adds value, and it is front-loaded for quick understanding.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists, the description need not cover return values. It covers the essential arguments. For a simple count tool, it is fairly complete, though some details on query syntax or performance could improve it.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It explains each parameter briefly ('Index to count', 'Optional query to filter documents'), adding meaningful context beyond the schema. However, the query format is not detailed, so a 4 is appropriate.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Count documents matching a query', specifying the verb (count) and resource (documents) with a condition. This straightforwardly distinguishes it from sibling tools like search or aggregate.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description mentions an optional query filter, but provides no guidance on when to use this tool versus alternatives (e.g., search) or any context about performance or suitability.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

date_histogramA

Get document counts over time (date histogram).

Args: index: Index to aggregate. field: Date field to aggregate on (e.g., "@timestamp"). interval: Time interval (minute, hour, day, week, month, year). query: Optional query to filter documents.

Returns: Time buckets with document counts.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYes
fieldYes
intervalNoday
queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description must fully disclose behavioral aspects. It only states the basic return format ('Time buckets with document counts') but does not mention potential performance impacts, required permissions, or limits on bucket counts, which are critical for an aggregation tool.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with a clear summary line followed by structured Args and Returns sections. Every sentence adds information without redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

The description covers the purpose and parameters adequately, and an output schema exists for return details. However, it lacks usage guidelines and behavioral context (e.g., performance considerations), making it minimally complete for a moderately complex aggregation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 0% schema description coverage, the description adds value by explaining each parameter: 'index' (Index to aggregate), 'field' (Date field, e.g., '@timestamp'), 'interval' (minute, hour, day, week, month, year), and 'query' (Optional filter). This clarifies usage beyond parameter names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get document counts over time (date histogram)', which specifies the verb 'get' and the resource 'document counts' with a time-based aggregation. This distinguishes it from sibling tools like terms_aggregation (which aggregates by terms) and count_docs (total count).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description does not explicitly state when to use this tool versus alternatives like terms_aggregation or search. It only describes what it does, leaving usage context implied by the name and parameter descriptions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

describe_indexA

Get detailed information about an index.

Args: index: Name of the index to describe.

Returns: Index mappings (fields and types), settings, and statistics.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.8/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Without annotations, the description should explicitly note that the tool is read-only. It describes the output (mappings, settings, statistics) but does not mention side effects, permissions, or that it is a safe read operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise with a clear purpose, followed by structured Args and Returns sections. Every sentence adds value and is front-loaded.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and presence of an output schema, the description covers purpose, input, and output. Lacks usage guidance but is otherwise complete for a retrieval tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The sole parameter 'index' is described as 'Name of the index to describe,' adding clear meaning beyond the schema (which only has a title). This is sufficient for a simple parameter.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool retrieves detailed information about an index, specifying mappings, settings, and statistics. This distinguishes it from sibling tools like get_mappings and get_index_stats which focus on specific aspects.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use describe_index versus alternatives like get_mappings or get_index_stats. The description implies it is for a comprehensive overview but does not state exclusions or context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

disconnectA

Disconnect from the Elasticsearch cluster.

Returns: Disconnection status.

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.5/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided. The description only mentions return of 'Disconnection status' but does not disclose behavioral aspects like idempotency, side effects, or what happens when already disconnected.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise and front-loaded. Two clear sentences achieve the purpose without unnecessary detail.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a tool with zero parameters and an output schema (context states true), the description is nearly complete but lacks details about the return value structure and any prerequisites. Still minimal but functional.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

No parameters exist, and schema coverage is 100%. Baseline 4 is appropriate as description adds no param info, but none is needed.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action 'Disconnect from the Elasticsearch cluster.' It uses a specific verb and resource, and is clearly distinguished from sibling 'connect'.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use or avoid this tool. No mention of prerequisites or alternatives. The description lacks usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_aliasesA

Get index aliases.

Args: index: Optional index name to filter aliases.

Returns: List of aliases with their target indices.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4/5.0
Behavior3/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description carries full burden. It explains it returns a list and optionally filters, but does not disclose read-only nature, authentication needs, rate limits, or behavior for missing indices. Basic but not thorough.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise: two sentences plus structured Args/Returns. It is front-loaded with the action and contains no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (1 optional parameter, no required fields, output schema present), the description is adequate. It covers purpose, parameter, and return, though lacks examples or edge cases. Still nearly complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, but the description adds clear meaning: 'Optional index name to filter aliases.' This explains the parameter's purpose and optionality, compensating for the schema gap.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get index aliases,' which is a specific verb+resource. It distinguishes from siblings like get_mappings or get_document, as it is the only tool focused on aliases.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies when to use (to retrieve aliases) but provides no explicit guidance on when not to use or alternatives among siblings. It mentions an optional index filter but no context for selecting this over other list tools.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_documentB

Get a document by ID.

Args: index: Index containing the document. doc_id: Document ID.

Returns: Document source data or not found error.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYes
doc_idYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description only mentions returning document source or not found error. It does not disclose any behavioral traits such as read-only nature, permissions, or side effects.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with two sentences and clear parameter/return sections. However, it could be more structured with explicit headings.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a simple get-by-ID tool with an output schema, the description is adequate but lacks details like ID format, index requirements, or error handling nuances. It is minimally complete.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters2/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, and the description merely repeats parameter names ('index', 'doc_id') with trivial explanations. It adds minimal meaning beyond the parameter names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool gets a document by ID, specifying the resource (document) and action (get). It distinguishes from sibling tools like es_search and count_docs.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. It lacks context on scenarios where this tool is preferred over search index tools or other get operations.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_index_statsB

Get statistics for an index.

Args: index: Name of the index.

Returns: Document counts, store size, indexing and search statistics.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.1/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations exist, so the description must fully disclose behavior. It implies a read operation but does not explicitly state non-destructiveness, permissions needed, or potential side effects. Returns are listed but not detailed.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise (one sentence plus parameter/return notes) and front-loaded with the purpose. No unnecessary words, though the parameter line could be integrated more naturally.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the presence of an output schema, the description adequately covers purpose, parameter, and return. It is complete for a simple stats tool, though it lacks context for its place among siblings.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The only parameter 'index' is described as 'Name of the index' in the documentation, adding minimal meaning beyond the schema property definition. Schema description coverage is 0%, so the description partially compensates, but is still generic.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Get statistics for an index', specifying the action and resource. It lists return types (document counts, store size, etc.), but does not differentiate from sibling tools like describe_index or count_docs, which have overlapping purposes.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance is provided on when to use this tool vs alternatives. Sibling tools like describe_index or count_docs are not mentioned, and there is no indication of prerequisites or contextual cues.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

get_mappingsB

Get field mappings for an index.

Args: index: Name of the index.

Returns: Field definitions including types, analyzers, and options.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYes

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.3/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description fails to disclose behavioral traits such as read-only nature, error handling, or prerequisites. Minimal transparency beyond basic output description.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Short and front-loaded, with a clear first sentence and structured Args/Returns. The Returns line is somewhat redundant but acceptable.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given an output schema exists and the tool is simple, the description adequately covers purpose and return content. It lacks error behavior but is sufficient.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, but the description adds basic meaning by stating the parameter is the index name. It does not elaborate on format or constraints.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states it gets field mappings for an index, specifying the resource (index) and action (get field mappings). It distinguishes from sibling tools like get_aliases or get_document.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No guidance on when to use this tool versus alternatives. It does not provide context or exclusion criteria.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_indicesA

List all indices in the cluster.

Args: pattern: Index pattern to filter (supports wildcards like "logs-*"). include_hidden: Include hidden indices starting with "." (default: False).

Returns: List of indices with health, status, doc count, and size.

ParametersJSON Schema
NameRequiredDescriptionDefault
patternNo*
include_hiddenNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.6/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but description discloses read-only behavior, arguments, and return fields (health, status, doc count, size). Adequately transparent for a list operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Extremely concise: two purposeful sentences plus structured args/returns. No wasted words. Front-loaded purpose.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given low complexity, 2 parameters, and presence of output schema, description is complete. Covers all necessary information for an agent to use correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema provides 0% description coverage, but description fully compensates: explains pattern wildcards and include_hidden meaning (hidden indices start with '.'). Adds value beyond schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clear verb+resource+scope: 'List all indices in the cluster.' Distinguishes from siblings like describe_index, get_index_stats, etc. Purpose is immediately obvious.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Clearly states arguments and their purpose (pattern filtering with wildcards, include_hidden). Though no explicit exclusion or alternative recommendations, the context is sufficient for most use cases.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

list_nodesA

List all nodes in the cluster.

Returns: Node names, IPs, roles, and resource usage (CPU, memory, disk).

ParametersJSON Schema
NameRequiredDescriptionDefault

No parameters

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A4.3/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so description carries full burden. It discloses output fields (names, IPs, roles, resource usage) and implies a read-only operation. Additional detail on response stability or potential overhead would improve, but current info is adequate.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Brief, front-loaded sentence followed by bullet-like return list. No unnecessary words, every sentence adds value.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no parameters and presence of output schema, the description sufficiently covers what the tool does and returns. It is complete for a simple list operation.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Zero parameters, so schema coverage is 100%. Baseline per instructions is 4. Description does not need to add parameter information.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Description clearly states 'List all nodes in the cluster', using a specific verb and resource. It is distinct from sibling tools like cluster_health or cluster_stats, which focus on cluster-level metrics.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool versus alternatives. However, the simple nature of listing all nodes makes usage obvious. Lacks explicit when-not or alternative tool references.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

search_simpleA

Execute a simple query string search.

Args: index: Index to search. q: Query string (supports Lucene syntax like "status:error AND level:critical"). size: Maximum results to return.

Returns: Search hits matching the query string.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYes
qYes
sizeNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

A3.7/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations, the description carries the full burden. It only mentions search hits are returned, but does not disclose read-only nature, side effects, authentication needs, or rate limits. Basic behavioral details are missing.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is concise with a one-line purpose, a clear args block, and a returns line. It is front-loaded and contains no unnecessary words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity and the presence of an output schema, the description covers the core functionality. However, it lacks optional details like pagination, error behaviors, or performance considerations, which would enhance completeness.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 0%, so the description must compensate. It explains 'index' (Index to search), 'q' (Query string with Lucene syntax example), and 'size' (Max results). This adds meaningful context beyond property names.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'Execute a simple query string search,' which distinguishes it from sibling tools like 'es_search' that imply more complex searches. The verb 'search' and resource 'query string' are specific.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage for simple query string searches with Lucene syntax support, but it does not explicitly state when to use this tool versus alternatives like 'es_search' or 'count_docs'. No exclusions or context are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

terms_aggregationB

Get top values for a field (terms aggregation).

Args: index: Index to aggregate. field: Field to get top values for (must be keyword or numeric). size: Number of top terms to return (default: 10). query: Optional query to filter documents.

Returns: Top field values with document counts.

ParametersJSON Schema
NameRequiredDescriptionDefault
indexYes
fieldYes
sizeNo
queryNo

Output Schema

ParametersJSON Schema
NameRequiredDescription

No output parameters

TDQS

B3.4/5.0
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, so the description carries full burden. It states 'get' implying a read operation, but lacks details on mutability, authentication, rate limits, or other behavioral traits. The field constraint (keyword/numeric) is a minor addition.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is very concise with clear sections (Args, Returns). However, the 'Args' section is a bit terse; each sentence earns its place. No wasted words.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given no annotations and an output schema (present but not detailed here), the description covers basic intent and parameters. It lacks context on when to choose this aggregation over others (e.g., `date_histogram`) and does not describe return format fully.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 0% description coverage, so the description compensates well. It explains 'field' must be keyword/numeric, 'size' default 10, and 'query' optional. This adds meaning to parameters beyond the schema structure.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Clearly states 'Get top values for a field (terms aggregation)', which is a specific verb and resource. It distinguishes itself from siblings like 'aggregate' (general) and 'date_histogram' (time-based).

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

No explicit guidance on when to use this tool vs alternatives like 'aggregate' or 'date_histogram'. The description only implies usage for terms aggregation but does not provide context or exclusions.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Tool Schema Changelog

Recent tool additions, removals, and schema changes observed during successful MCP inspections. Dates show when Glama detected each change.

  1. 18 tool updatesv0.1.1
    • First observedaggregate
    • First observedcluster_health
    • First observedcluster_info
    • First observedcluster_stats
    • First observedconnect
    • First observedcount_docs
    • First observeddate_histogram
    • First observeddescribe_index
    • First observeddisconnect
    • First observedes_search
    • First observedget_aliases
    • First observedget_document
    • First observedget_index_stats
    • First observedget_mappings
    • First observedlist_indices
    • First observedlist_nodes
    • First observedsearch_simple
    • First observedterms_aggregation

TDQS

A3.7/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose. Aggregation tools are differentiated by type (general, date histogram, terms), search tools by query language, and cluster/index/document operations cover separate concerns without overlap.

Naming Consistency5/5

All tool names follow a consistent snake_case convention with descriptive verb-noun patterns (e.g., list_indices, get_document, search_simple), making them predictable and easy to navigate.

Tool Count5/5

18 tools is appropriate for an Elasticsearch MCP server, covering connection, cluster, indices, documents, search, and aggregations without being excessive or insufficient.

Completeness2/5

The tool set lacks fundamental CRUD operations for indices (create, delete, update) and documents (create, update, delete), leaving significant gaps for basic data management tasks.

Maintenance

ActivityInactive
ResponsivenessSyncing

Resources

Unclaimed servers have limited discoverability.

Looking for Admin?

If you are the server author, to access and configure the admin panel.

Related MCP Connectors

Related MCP Servers

  • A
    license
    Not graded
    quality
    D
    maintenance
    Enables natural language querying and analysis of OpenTelemetry traces, metrics, and logs stored in Elasticsearch/OpenSearch, allowing AI assistants to investigate performance issues, find root causes, and explore system behavior.
    16
    14
    MIT
  • A
    license
    B
    quality
    D
    maintenance
    Enables interaction with Elasticsearch clusters for health checks, index management, document CRUD operations, and search via natural language.
    10
    20
    MIT

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/bpamiri/elasticsearch-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server