list_aliases
Retrieve all index aliases in an Elasticsearch cluster. Simplify alias management and ensure efficient indexing and query operations with this tool.
Instructions
List all aliases.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/alias.py:9-12 (handler)MCP tool handler for 'list_aliases' that lists all aliases by delegating to the search client's list_aliases method.@mcp.tool() def list_aliases() -> List[Dict]: """List all aliases.""" return self.search_client.list_aliases()
- src/clients/common/alias.py:6-8 (helper)Core implementation in AliasClient that retrieves all aliases from the search engine client.def list_aliases(self) -> Dict: """Get all aliases.""" return self.client.cat.aliases()
- src/server.py:44-53 (registration)Includes AliasTools in the list of tool classes registered with the MCP server via ToolsRegister, which instantiates and calls register_tools on it.tool_classes = [ IndexTools, DocumentTools, ClusterTools, AliasTools, DataStreamTools, GeneralTools, ] # Register all tools register.register_all_tools(tool_classes)