Skip to main content
Glama
qiniu

Qiniu MCP Server

Official
by qiniu

live_streaming_get_push_urls

Generate RTMP and WHIP push URLs for live streaming by providing domain, bucket, and stream name parameters.

Instructions

Get push URLs for a stream. Returns RTMP and WHIP push URLs that can be used to push live streams.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
push_domainYesThe push domain name
bucketYesLiveStreaming bucket name
stream_nameYesThe stream name

Implementation Reference

  • The handler function for the 'live_streaming_get_push_urls' tool, decorated with @tools.tool_meta that defines the tool name, description, input schema, and executes by calling the service method.
    @tools.tool_meta(
        types.Tool(
            name="live_streaming_get_push_urls",
            description="Get push URLs for a stream. Returns RTMP and WHIP push URLs that can be used to push live streams.",
            inputSchema={
                "type": "object",
                "properties": {
                    "push_domain": {
                        "type": "string",
                        "description": "The push domain name",
                    },
                    "bucket": {
                        "type": "string",
                        "description": _BUCKET_DESC,
                    },
                    "stream_name": {
                        "type": "string",
                        "description": "The stream name",
                    },
                },
                "required": ["push_domain", "bucket", "stream_name"],
            },
        )
    )
    async def get_push_urls(self, **kwargs) -> list[types.TextContent]:
        result = self.live_streaming.get_push_urls(**kwargs)
        return [types.TextContent(type="text", text=str(result))]
  • Core helper method in LiveStreamingService that implements the logic to generate RTMP and WHIP push URLs for the given push_domain, bucket, and stream_name.
    def get_push_urls(self, push_domain: str, bucket: str, stream_name: str) -> Dict[str, Any]:
        """
        Generate push URLs for RTMP and WHIP protocols
    
        Args:
            push_domain: The push domain
            bucket: The bucket name
            stream_name: The stream name
    
        Returns:
            Dict containing RTMP and WHIP push URLs
        """
        rtmp_url = f"rtmp://{push_domain}/{bucket}/{stream_name}"
        whip_url = f"https://{push_domain}/{bucket}/{stream_name}.whip"
    
        logger.info(f"Generated push URLs for stream: {stream_name}")
        return {
            "status": "success",
            "push_domain": push_domain,
            "bucket": bucket,
            "stream_name": stream_name,
            "rtmp_url": rtmp_url,
            "whip_url": whip_url,
            "message": "Push URLs generated successfully"
        }
  • register_tools function that instantiates _ToolImpl and calls tools.auto_register_tools with the list of tool methods, including get_push_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,
            ]
        )
  • Top-level load function that creates LiveStreamingService and calls register_tools to register the live streaming tools to the MCP server.
    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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool returns URLs but doesn't describe any behavioral traits such as authentication requirements, rate limits, error conditions, or whether it's a read-only operation. For a tool with zero annotation coverage, this is a significant gap in transparency.

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 appropriately sized with two sentences that are front-loaded and efficient. The first sentence states the purpose, and the second adds useful detail about the return types. There's no wasted text, but it could be slightly more structured for clarity.

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 moderate complexity (3 required parameters, no output schema, no annotations), the description is minimally adequate. It covers the basic purpose and return types but lacks details on behavioral aspects, error handling, or integration with sibling tools. Without annotations or output schema, more context would improve 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?

Schema description coverage is 100%, so the schema already documents all three parameters with descriptions. The description doesn't add any meaning beyond what the schema provides, such as explaining relationships between parameters or usage examples. Baseline 3 is appropriate when the schema handles parameter documentation effectively.

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 action ('Get push URLs') and resource ('for a stream'), specifying what the tool does. It distinguishes from siblings like 'live_streaming_get_play_urls' by focusing on push URLs rather than play URLs. However, it doesn't explicitly differentiate from other push-related tools like 'live_streaming_bind_push_domain', which slightly reduces specificity.

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

Usage Guidelines3/5

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

The description implies usage when needing push URLs for live streaming, but doesn't explicitly state when to use this tool versus alternatives like 'live_streaming_create_stream' for setup or 'live_streaming_bind_push_domain' for domain configuration. It mentions the return types (RTMP and WHIP URLs), which provides some context, but lacks clear exclusions or prerequisites.

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