Skip to main content
Glama
cr7258

Elasticsearch MCP Server

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
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • 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, ]

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