Skip to main content
Glama
qiniu

Qiniu MCP Server

Official
by qiniu

live_streaming_get_play_urls

Retrieve FLV, M3U8, and WHEP playback URLs to access live streams from Qiniu Cloud's live streaming service.

Instructions

Get playback URLs for a stream. Returns FLV, M3U8, and WHEP playback URLs that can be used to play live streams.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
play_domainYesThe playback domain name
bucketYesLiveStreaming bucket name
stream_nameYesThe stream name

Implementation Reference

  • The async handler function for the MCP tool 'live_streaming_get_play_urls' that delegates to LiveStreamingService.get_play_urls and returns the result as TextContent.
    async def get_play_urls(self, **kwargs) -> list[types.TextContent]:
        result = self.live_streaming.get_play_urls(**kwargs)
        return [types.TextContent(type="text", text=str(result))]
  • The tool metadata decorator defining the schema, name, description, and input validation for 'live_streaming_get_play_urls'.
    @tools.tool_meta(
        types.Tool(
            name="live_streaming_get_play_urls",
            description="Get playback URLs for a stream. Returns FLV, M3U8, and WHEP playback URLs that can be used to play live streams.",
            inputSchema={
                "type": "object",
                "properties": {
                    "play_domain": {
                        "type": "string",
                        "description": "The playback domain name",
                    },
                    "bucket": {
                        "type": "string",
                        "description": _BUCKET_DESC,
                    },
                    "stream_name": {
                        "type": "string",
                        "description": "The stream name",
                    },
                },
                "required": ["play_domain", "bucket", "stream_name"],
            },
        )
    )
  • The registration function that creates a tool implementation instance and auto-registers all LiveStreaming tools, including 'live_streaming_get_play_urls'.
    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,
            ]
        )
  • The core implementation in LiveStreamingService that generates the FLV, M3U8, and WHEP playback URLs using string formatting.
    def get_play_urls(self, play_domain: str, bucket: str, stream_name: str) -> Dict[str, Any]:
        """
        Generate playback URLs for FLV, M3U8, and WHEP protocols
    
        Args:
            play_domain: The playback domain
            bucket: The bucket name
            stream_name: The stream name
    
        Returns:
            Dict containing FLV, M3U8, and WHEP playback URLs
        """
        flv_url = f"https://{play_domain}/{bucket}/{stream_name}.flv"
        m3u8_url = f"https://{play_domain}/{bucket}/{stream_name}.m3u8"
        whep_url = f"https://{play_domain}/{bucket}/{stream_name}.whep"
    
        logger.info(f"Generated playback URLs for stream: {stream_name}")
        return {
            "status": "success",
            "play_domain": play_domain,
            "bucket": bucket,
            "stream_name": stream_name,
            "flv_url": flv_url,
            "m3u8_url": m3u8_url,
            "whep_url": whep_url,
            "message": "Playback URLs generated successfully"
        }
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It states the tool returns URLs for playback, implying a read-only operation, but doesn't disclose behavioral traits like authentication requirements, rate limits, error conditions, or whether the URLs are ephemeral. This is a significant gap for a tool with no annotation coverage.

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 concise and front-loaded, with two sentences that directly state the purpose and output. There's no unnecessary information, but it could be slightly improved by integrating usage context without adding bulk.

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 the tool's complexity (3 required parameters, no output schema, and no annotations), the description is incomplete. It doesn't explain the return format beyond URL types, lacks error handling details, and omits prerequisites like stream existence. For a tool with no structured output or annotations, more context is needed.

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 input schema has 100% description coverage, so the baseline is 3. The description adds no additional meaning beyond the schema, such as explaining how parameters relate to each other or providing examples. It relies entirely on the schema for parameter documentation.

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 tool's purpose: 'Get playback URLs for a stream' specifies the verb ('Get') and resource ('playback URLs'), and it distinguishes the tool by mentioning the URL types returned (FLV, M3U8, WHEP). However, it doesn't explicitly differentiate from sibling tools like 'live_streaming_get_push_urls' or 'get_object_url', which slightly reduces clarity.

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. It doesn't mention prerequisites, such as needing an existing stream, or compare it to similar tools like 'live_streaming_get_push_urls' or 'get_object_url', leaving the agent without context for selection.

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