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,
    ]        
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden and does well: it discloses the destructive nature ('Permanently deletes'), specifies what gets destroyed ('all their backing indices'), and mentions wildcard pattern support. However, it doesn't cover permissions needed, rate limits, or error conditions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, zero waste: first states purpose, second clarifies destructiveness and scope, third documents the single parameter with syntax details. Well-structured and front-loaded with the most critical information (permanent deletion).

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a destructive tool with no annotations and no output schema, the description is strong: covers purpose, behavior, and parameters well. Minor gaps: no explicit confirmation prompt warning, no error handling details, and no output format mentioned (though none is defined in schema).

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate fully. It does: it explains the 'name' parameter accepts single names, comma-separated lists, or wildcard patterns, adding crucial semantics beyond the bare schema. This is comprehensive parameter documentation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb ('Delete') and resource ('data streams'), specifies scope ('one or more'), and distinguishes from siblings like delete_index and delete_document by focusing specifically on data streams. It's specific and unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage context (deleting data streams) but doesn't explicitly state when to use this vs. alternatives like delete_index or delete_by_query. No prerequisites, exclusions, or comparisons to sibling tools are provided.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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