Skip to main content
Glama
cr7258

Elasticsearch MCP Server

get_data_stream

Retrieve configuration, mappings, and settings for Elasticsearch data streams to monitor and manage streaming data pipelines.

Instructions

Get information about one or more data streams.

        Retrieves configuration, mappings, settings, and other information
        about the specified data streams.
        
        Args:
            name: Name of the data stream(s) to retrieve.
                  Can be a comma-separated list or wildcard pattern.
                  If not provided, retrieves all data streams.
        

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameNo

Implementation Reference

  • The core handler function for the 'get_data_stream' tool, decorated with @mcp.tool(). It handles input validation via type hints and docstring, executes the logic by delegating to the search client, and defines the tool schema implicitly.
    @mcp.tool()
    def get_data_stream(name: Optional[str] = None) -> Dict:
        """Get information about one or more data streams.
        
        Retrieves configuration, mappings, settings, and other information
        about the specified data streams.
        
        Args:
            name: Name of the data stream(s) to retrieve.
                  Can be a comma-separated list or wildcard pattern.
                  If not provided, retrieves all data streams.
        """
        return self.search_client.get_data_stream(name=name)
  • src/server.py:44-53 (registration)
    Top-level registration of DataStreamTools class in the MCP server initialization, which triggers instantiation and tool registration via ToolsRegister.
    tool_classes = [
        IndexTools,
        DocumentTools,
        ClusterTools,
        AliasTools,
        DataStreamTools,
        GeneralTools,
    ]        
    # Register all tools
    register.register_all_tools(tool_classes)
  • Underlying client method implementation that the tool handler delegates to, providing the actual API call to the search engine indices.get_data_stream.
    def get_data_stream(self, name: Optional[str] = None) -> Dict:
        """Get information about one or more data streams."""
        if name:
            return self.client.indices.get_data_stream(name=name)
        else:
            return self.client.indices.get_data_stream()
  • The register_tools method in DataStreamTools class where the @mcp.tool() decorators are applied during registration.
    def register_tools(self, mcp: FastMCP):
        """Register data stream tools with the MCP server."""
Behavior3/5

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

With no annotations provided, the description carries full burden. It describes the retrieval behavior and parameter flexibility (comma-separated list, wildcard pattern, optional parameter), but doesn't disclose important behavioral traits like whether this is a read-only operation, potential rate limits, authentication requirements, or what happens when no streams match. The description adds some context but leaves gaps in behavioral disclosure.

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

Conciseness4/5

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

The description is well-structured with clear sections and front-loaded purpose statement. Every sentence adds value, though the Args section formatting creates some visual bulk. The content is appropriately sized for a single-parameter tool with comprehensive parameter documentation.

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

Completeness3/5

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

Given no annotations, no output schema, and a single parameter with 0% schema coverage, the description does a good job explaining the parameter but leaves gaps. It doesn't describe the return format, error conditions, or behavioral constraints. For a retrieval tool in a context with many sibling tools, more completeness would be helpful, though the parameter documentation is thorough.

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?

The schema has 0% description coverage, so the description fully compensates by providing rich parameter semantics. It explains the 'name' parameter can be a comma-separated list or wildcard pattern, specifies the default behavior when not provided (retrieves all data streams), and clarifies it retrieves information about 'one or more' data streams based on the parameter value.

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 'Get' and resource 'data streams' with specific details about what information is retrieved ('configuration, mappings, settings, and other information'). It distinguishes from siblings like get_document, get_index, and get_alias by focusing specifically on data streams.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool (to retrieve information about data streams) and includes usage guidance in the Args section about parameter behavior. However, it doesn't explicitly state when NOT to use it or name specific alternatives among siblings like get_index or get_document for similar retrieval operations.

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