Skip to main content
Glama
qiniu

Qiniu MCP Server

Official
by qiniu

live_streaming_list_streams

Retrieve all live streams from a specified Qiniu Cloud bucket to manage and monitor streaming content.

Instructions

List all streams in a specific live streaming bucket. Returns the list of streams for the given bucket ID.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucket_idYesThe bucket ID/name to list streams from

Implementation Reference

  • Handler for the 'live_streaming_list_streams' MCP tool, decorated with metadata including schema. It acts as a thin wrapper invoking LiveStreamingService.list_streams and formatting the MCP response.
    @tools.tool_meta(
        types.Tool(
            name="live_streaming_list_streams",
            description="List all streams in a specific live streaming bucket. Returns the list of streams for the given bucket ID.",
            inputSchema={
                "type": "object",
                "properties": {
                    "bucket_id": {
                        "type": "string",
                        "description": "The bucket ID/name to list streams from",
                    },
                },
                "required": ["bucket_id"],
            },
        )
    )
    async def list_streams(self, **kwargs) -> list[types.TextContent]:
        result = await self.live_streaming.list_streams(**kwargs)
        return [types.TextContent(type="text", text=str(result))]
  • JSON Schema defining the input parameters for the live_streaming_list_streams tool (requires 'bucket_id').
        inputSchema={
            "type": "object",
            "properties": {
                "bucket_id": {
                    "type": "string",
                    "description": "The bucket ID/name to list streams from",
                },
            },
            "required": ["bucket_id"],
        },
    )
  • Core helper method in LiveStreamingService implementing the logic to list streams via HTTP GET request to the live streaming API endpoint.
    async def list_streams(self, bucket_id: str) -> Dict[str, Any]:
        """
        List all streams in a specific live streaming bucket
    
        Args:
            bucket_id: The bucket ID/name
    
        Returns:
            Dict containing the list of streams in the bucket
        """
        if not self.live_endpoint:
            self.live_endpoint = "mls.cn-east-1.qiniumiku.com"
    
        # Remove protocol to get base endpoint
        endpoint = self.live_endpoint
        if endpoint.startswith("http://"):
            endpoint = endpoint[7:]
        elif endpoint.startswith("https://"):
            endpoint = endpoint[8:]
    
        url = f"https://{endpoint}/?streamlist&bucketId={bucket_id}"
        headers = self._get_auth_header(method="GET", url=url)
    
        logger.info(f"Listing streams in bucket: {bucket_id}")
    
        async with aiohttp.ClientSession() as session:
            async with session.get(url, headers=headers) as response:
                status = response.status
                text = await response.text()
    
                if status == 200:
                    logger.info(f"Successfully listed streams in bucket: {bucket_id}")
                    return {
                        "status": "success",
                        "bucket_id": bucket_id,
                        "data": text,
                        "message": f"Streams in bucket '{bucket_id}' listed successfully",
                        "status_code": status
                    }
                else:
                    logger.error(f"Failed to list streams in bucket: {bucket_id}, status: {status}, response: {text}")
                    return {
                        "status": "error",
                        "bucket_id": bucket_id,
                        "message": f"Failed to list streams: {text}",
                        "status_code": status
                    }
  • Module-level registration function that creates a tool implementation instance and auto-registers all live streaming tools, including list_streams.
    def register_tools(live_streaming: LiveStreamingService):
        tool_impl = _ToolImpl(live_streaming)
        tools.auto_register_tools(
            [
                tool_impl.create_bucket,
                tool_impl.create_stream,
                tool_impl.bind_push_domain,
                tool_impl.bind_play_domain,
                tool_impl.get_push_urls,
                tool_impl.get_play_urls,
                tool_impl.query_live_traffic_stats,
                tool_impl.list_buckets,
                tool_impl.list_streams,
            ]
        )
  • Top-level load function that instantiates LiveStreamingService and calls register_tools to register the live streaming MCP tools.
    def load(cfg: config.Config):
        live = LiveStreamingService(cfg)
        register_tools(live)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions that it 'Returns the list of streams,' but doesn't specify format, pagination, error conditions, or authentication requirements. For a read operation with zero annotation coverage, this leaves significant gaps in understanding how the tool behaves.

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?

The description is two sentences, front-loaded with the core purpose and followed by a brief note on the return value. Every word earns its place with no redundancy or fluff, making it highly efficient.

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 the tool's low complexity (one parameter, no output schema, no annotations), the description is minimally adequate. It covers the basic action and return, but lacks details on behavior, usage context, or output format, leaving room for improvement in completeness.

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

Parameters3/5

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

The schema description coverage is 100%, so the schema already documents the single parameter 'bucket_id' with its description. The description adds no additional meaning beyond what's in the schema, such as examples or constraints, resulting in the baseline score of 3.

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 the verb ('List') and resource ('all streams in a specific live streaming bucket'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'list_buckets' or 'list_objects', which would require a 5.

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?

The description provides no guidance on when to use this tool versus alternatives like 'list_buckets' or 'list_objects', nor does it mention prerequisites or exclusions. It only states what the tool does, not when it's appropriate.

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/qiniu/qiniu-mcp-server'

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