Skip to main content
Glama
cr7258

Elasticsearch MCP Server

list_indices

Retrieve all index names from an Elasticsearch cluster to view available data collections for search and management operations.

Instructions

List all indices.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The handler function for the 'list_indices' MCP tool. It is decorated with @mcp.tool() for registration and executes by calling the search client's list_indices method.
    @mcp.tool()
    def list_indices() -> List[Dict]:
        """List all indices."""
        return self.search_client.list_indices()
  • The underlying helper method in IndexClient that implements the core logic by calling the search client's cat.indices() API.
    def list_indices(self) -> Dict:
        """List all indices."""
        return self.client.cat.indices()
  • src/server.py:44-53 (registration)
    Registration of IndexTools class in the server, which leads to instantiation and calling register_tools(mcp), applying the @mcp.tool() decorators including for list_indices.
    tool_classes = [
        IndexTools,
        DocumentTools,
        ClusterTools,
        AliasTools,
        DataStreamTools,
        GeneralTools,
    ]        
    # Register all tools
    register.register_all_tools(tool_classes)
Behavior2/5

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

With no annotations provided, the description carries full burden but only states the basic action. It doesn't disclose behavioral traits such as whether this is a read-only operation, how results are formatted, if there are rate limits, or what happens with large numbers of indices.

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 ('List all indices.') with no wasted words. It's front-loaded and efficiently communicates the core purpose in a single, clear sentence.

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

Completeness2/5

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

Given the complexity (a list operation with no output schema) and lack of annotations, the description is incomplete. It doesn't explain return values, error conditions, or behavioral nuances, leaving significant gaps for an AI agent to understand how to use the tool effectively.

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 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description doesn't add parameter details, but that's appropriate given the lack of parameters, warranting a baseline score above minimum.

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 the verb ('List') and resource ('indices'), making the purpose immediately understandable. It doesn't differentiate from sibling tools like 'get_index' or 'list_aliases', but it's not vague or tautological.

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?

The description provides no guidance on when to use this tool versus alternatives like 'get_index' (for a specific index) or 'list_aliases' (for aliases). It lacks any context about prerequisites, timing, or exclusions.

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

Install Server

Other Tools

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/cr7258/elasticsearch-mcp-server'

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