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
| Name | Required | Description | Default |
|---|---|---|---|
| name | No |
Implementation Reference
- src/tools/data_stream.py:23-35 (handler)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()
- src/tools/data_stream.py:8-9 (registration)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."""