Skip to main content
Glama
alilxxey

openobserve-community-mcp

list_streams

List and filter streams in your OpenObserve organization. Specify stream type, keyword, pagination, and sorting to retrieve streams for monitoring or analysis.

Instructions

List streams available in the current organization.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
stream_typeNologs
keywordNo
offsetNo
limitNo
sortNoname
include_rawNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The MCP tool handler for 'list_streams'. It is registered as a FastMCP tool, accepts parameters (stream_type, keyword, offset, limit, sort, include_raw), calls client.list_streams() and formats the result via build_list_streams_result().
    def list_streams(
        stream_type: str = "logs",
        keyword: str = "",
        offset: int = 0,
        limit: int = 50,
        sort: str = "name",
        include_raw: bool = False,
    ) -> dict[str, Any]:
        """List streams available in the current organization."""
        client = client_provider.get()
        raw = client.list_streams(
            stream_type=stream_type,
            keyword=keyword,
            offset=offset,
            limit=limit,
            sort=sort,
        )
        return build_list_streams_result(
            org_id=client.resolve_org_id(),
            stream_type=stream_type,
            raw=raw,
            include_raw=include_raw,
        )
  • The client-side method that sends the HTTP GET request to /api/{org_id}/streams with query parameters (type, keyword, offset, limit, sort). This is where the actual API call is made.
    def list_streams(
        self,
        *,
        stream_type: str,
        keyword: str = "",
        offset: int = 0,
        limit: int = 50,
        sort: str = "name",
    ) -> Any:
        return self.request_json(
            "GET",
            self._org_path("/api/{org_id}/streams"),
            query={
                "type": stream_type,
                "keyword": keyword,
                "offset": offset,
                "limit": limit,
                "sort": sort,
            },
        )
  • Helper function that shapes the raw API response into a compact result dict with org_id, stream_type, total, streams list (name, stream_type, storage_type, doc_num, doc_time_min, doc_time_max), and optionally raw data.
    def build_list_streams_result(
        *,
        org_id: str,
        stream_type: str,
        raw: Any,
        include_raw: bool,
    ) -> dict[str, Any]:
        items = raw.get("list", []) if isinstance(raw, dict) else []
        result: dict[str, Any] = {
            "org_id": org_id,
            "stream_type": stream_type,
            "total": raw.get("total") if isinstance(raw, dict) else None,
            "streams": [
                {
                    "name": item.get("name"),
                    "stream_type": item.get("stream_type"),
                    "storage_type": item.get("storage_type"),
                    "doc_num": item.get("stats", {}).get("doc_num") if isinstance(item, dict) else None,
                    "doc_time_min": item.get("stats", {}).get("doc_time_min") if isinstance(item, dict) else None,
                    "doc_time_max": item.get("stats", {}).get("doc_time_max") if isinstance(item, dict) else None,
                }
                for item in items
            ],
        }
        return maybe_include_raw(result, raw, include_raw)
  • The tool is registered with FastMCP via the @server.tool() decorator on line 78, which makes 'list_streams' available as an MCP tool.
    @server.tool()
    def list_streams(
        stream_type: str = "logs",
        keyword: str = "",
Behavior2/5

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

No annotations provided, so the description must disclose behavioral traits. It does not mention read-only nature, authentication needs, rate limits, or pagination behavior. The phrase 'available in the current organization' implies scope but lacks detail.

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

Conciseness3/5

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

The description is a single sentence, which is concise but overly minimal. It could provide more context without being verbose.

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

Completeness2/5

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

Given 6 parameters with no schema descriptions, no annotations, and an output schema not elaborated, the description is incomplete. It fails to cover parameter meaning, expected behavior, or return format.

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

Parameters1/5

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

The input schema has 6 parameters with 0% description coverage (no parameter descriptions). The tool description adds no meaning for any parameter, leaving the agent with no understanding of stream_type, keyword, offset, limit, sort, or include_raw.

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

Purpose4/5

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

The description clearly states it lists streams in the current organization. It distinguishes from siblings like search_logs and get_stream_schema by focusing on listing available streams.

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

Usage Guidelines2/5

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

No guidance on when to use this tool versus alternatives (e.g., get_stream_schema for schema information, search_logs for searching log content). The description only states what it does, not when to prefer it.

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/alilxxey/openobserve-community-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server