delete_data_stream
Permanently remove Elasticsearch data streams and their backing indices to manage storage and clean up obsolete data.
Instructions
Delete one or more data streams.
Permanently deletes the specified data streams and all their backing indices.
Args:
name: Name of the data stream(s) to delete.
Can be a comma-separated list or wildcard pattern.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes |
Implementation Reference
- src/tools/data_stream.py:37-47 (handler)The main handler function for the 'delete_data_stream' MCP tool, decorated with @mcp.tool(). It defines the input schema via type hints and docstring, and delegates to the search client's delete_data_stream method.@mcp.tool() def delete_data_stream(name: str) -> Dict: """Delete one or more data streams. Permanently deletes the specified data streams and all their backing indices. Args: name: Name of the data stream(s) to delete. Can be a comma-separated list or wildcard pattern. """ return self.search_client.delete_data_stream(name=name)
- The supporting client method in DataStreamClient that implements the deletion logic by calling the underlying indices client's delete_data_stream.def delete_data_stream(self, name: str) -> Dict: """Delete one or more data streams.""" return self.client.indices.delete_data_stream(name=name)
- src/server.py:44-51 (registration)Registration of DataStreamTools (containing the delete_data_stream handler) by including it in the tool_classes list passed to ToolsRegister.register_all_tools, which instantiates it and registers its tools with the MCP server.tool_classes = [ IndexTools, DocumentTools, ClusterTools, AliasTools, DataStreamTools, GeneralTools, ]