delete_alias
Remove an alias from a specified Elasticsearch index to streamline index management. Input the index name and alias to delete. Enhances cluster organization and efficiency.
Instructions
Delete an alias for a specific index.
Args:
index: Name of the index
name: Name of the alias
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | Yes | ||
| name | Yes |
Implementation Reference
- src/tools/alias.py:36-45 (handler)The MCP tool handler implementation for 'delete_alias'. It is decorated with @mcp.tool(), specifies input parameters (index, name), includes documentation, and delegates execution to the underlying search_client's delete_alias method.@mcp.tool() def delete_alias(index: str, name: str) -> Dict: """ Delete an alias for a specific index. Args: index: Name of the index name: Name of the alias """ return self.search_client.delete_alias(index=index, name=name)
- src/server.py:44-53 (registration)Registration of the AliasTools class (containing delete_alias tool) by including it in the tool_classes list passed to ToolsRegister.register_all_tools().tool_classes = [ IndexTools, DocumentTools, ClusterTools, AliasTools, DataStreamTools, GeneralTools, ] # Register all tools register.register_all_tools(tool_classes)
- src/clients/common/alias.py:18-20 (helper)Underlying client helper method called by the MCP handler, which performs the actual alias deletion via the search engine client API.def delete_alias(self, index: str, name: str) -> Dict: """Delete an alias for the specified index.""" return self.client.indices.delete_alias(index=index, name=name)
- src/risk_config.py:24-27 (helper)Configuration marking 'delete_alias' as a high-risk operation for the AliasTools class, subject to runtime disabling via environment variables."AliasTools": { "put_alias", "delete_alias", },