Skip to main content
Glama
cr7258

Elasticsearch MCP Server

get_alias

Retrieve alias details for a specified index in Elasticsearch clusters using the MCP server, enabling efficient management of index operations and configurations.

Instructions

Get alias information for a specific index. Args: index: Name of the index

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
indexYes

Implementation Reference

  • The main handler function for the 'get_alias' MCP tool. It takes an index name and returns the alias information by delegating to the search client.
    @mcp.tool() def get_alias(index: str) -> Dict: """ Get alias information for a specific index. Args: index: Name of the index """ return self.search_client.get_alias(index=index)
  • src/server.py:44-53 (registration)
    The AliasTools class, which contains the get_alias tool, is included in the list of tool classes registered via ToolsRegister in the MCP server initialization.
    tool_classes = [ IndexTools, DocumentTools, ClusterTools, AliasTools, DataStreamTools, GeneralTools, ] # Register all tools register.register_all_tools(tool_classes)
  • Helper method in AliasClient that implements the actual API call to retrieve aliases for an index, called by the tool handler.
    def get_alias(self, index: str) -> Dict: """Get aliases for the specified index.""" return self.client.indices.get_alias(index=index)

Other Tools

Related 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