Skip to main content
Glama
cr7258

Elasticsearch MCP Server

create_data_stream

Create a new Elasticsearch data stream by specifying its name, requiring a matching index template for proper setup and management.

Instructions

Create a new data stream.

This creates a new data stream with the specified name. The data stream must have a matching index template before creation. Args: name: Name of the data stream to create

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYes

Implementation Reference

  • The FastMCP tool handler function for create_data_stream, decorated with @mcp.tool(), which defines the input schema via type hints and docstring, and executes by calling the search client's create_data_stream method.
    @mcp.tool() def create_data_stream(name: str) -> Dict: """Create a new data stream. This creates a new data stream with the specified name. The data stream must have a matching index template before creation. Args: name: Name of the data stream to create """ return self.search_client.create_data_stream(name=name)
  • Supporting client method in DataStreamClient that wraps the underlying search engine client's indices.create_data_stream call.
    def create_data_stream(self, name: str) -> Dict: """Create a new data stream.""" return self.client.indices.create_data_stream(name=name)
  • src/server.py:43-54 (registration)
    Server initialization registers DataStreamTools by including it in the tool_classes list passed to ToolsRegister.register_all_tools, which instantiates the class and calls its register_tools method.
    # Define all tool classes to register tool_classes = [ IndexTools, DocumentTools, ClusterTools, AliasTools, DataStreamTools, GeneralTools, ] # Register all tools register.register_all_tools(tool_classes)
  • Configuration listing 'create_data_stream' as a high-risk operation for DataStreamTools, used by the risk manager to potentially disable it.
    "DataStreamTools": { "create_data_stream", "delete_data_stream", },

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