Skip to main content
Glama
qiniu

Qiniu MCP Server

Official
by qiniu

live_streaming_bind_play_domain

Bind a playback domain to a LiveStreaming bucket to configure FLV/M3U8/WHEP streaming playback for live broadcasts.

Instructions

Bind a playback domain to a LiveStreaming bucket for live streaming. This allows you to configure the domain for playing back streams via FLV/M3U8/WHEP.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
bucketYesLiveStreaming bucket name
domainYesThe playback domain name (e.g., mcp-play1.qiniu.com)
domain_typeNoThe type of playback domain (default: live)live

Implementation Reference

  • MCP tool handler for 'live_streaming_bind_play_domain': decorated function that delegates to LiveStreamingService.bind_play_domain
    @tools.tool_meta(
        types.Tool(
            name="live_streaming_bind_play_domain",
            description="Bind a playback domain to a LiveStreaming bucket for live streaming. This allows you to configure the domain for playing back streams via FLV/M3U8/WHEP.",
            inputSchema={
                "type": "object",
                "properties": {
                    "bucket": {
                        "type": "string",
                        "description": _BUCKET_DESC,
                    },
                    "domain": {
                        "type": "string",
                        "description": "The playback domain name (e.g., mcp-play1.qiniu.com)",
                    },
                    "domain_type": {
                        "type": "string",
                        "description": "The type of playback domain (default: live)",
                        "default": "live",
                    },
                },
                "required": ["bucket", "domain"],
            },
        )
    )
    async def bind_play_domain(self, **kwargs) -> list[types.TextContent]:
        result = await self.live_streaming.bind_play_domain(**kwargs)
        return [types.TextContent(type="text", text=str(result))]
  • Input schema defining parameters: bucket (required), domain (required), domain_type (optional, default 'live')
    inputSchema={
        "type": "object",
        "properties": {
            "bucket": {
                "type": "string",
                "description": _BUCKET_DESC,
            },
            "domain": {
                "type": "string",
                "description": "The playback domain name (e.g., mcp-play1.qiniu.com)",
            },
            "domain_type": {
                "type": "string",
                "description": "The type of playback domain (default: live)",
                "default": "live",
            },
        },
        "required": ["bucket", "domain"],
    },
  • Core implementation of bind_play_domain in LiveStreamingService: makes authenticated POST request to bind playback domain to bucket
    async def bind_play_domain(self, bucket: str, domain: str, domain_type: str = "live") -> Dict[str, Any]:
        """
        Bind a playback domain to the bucket
    
        Args:
            bucket: The bucket name
            domain: The playback domain name
            domain_type: The type of playback domain (default: live)
    
        Returns:
            Dict containing the response status and message
        """
        url = f"{self._build_bucket_url(bucket)}/?domain"
        data = {
            "domain": domain,
            "type": domain_type
        }
        body_str = json.dumps(data)
        headers = {
            **self._get_auth_header(method="POST", url=url, content_type="application/json", body=body_str),
            "Content-Type": "application/json"
        }
        logger.info(f"Binding playback domain: {domain} (type: {domain_type}) to bucket: {bucket}")
    
        async with aiohttp.ClientSession() as session:
            async with session.post(url, headers=headers, json=data) as response:
                status = response.status
                text = await response.text()
    
                if status == 200 or status == 201:
                    logger.info(f"Successfully bound playback domain: {domain} to bucket: {bucket}")
                    return {
                        "status": "success",
                        "bucket": bucket,
                        "domain": domain,
                        "type": domain_type,
                        "message": f"Playback domain '{domain}' bound successfully to bucket '{bucket}'",
                        "status_code": status
                    }
                else:
                    logger.error(f"Failed to bind playback domain: {domain}, status: {status}, response: {text}")
                    return {
                        "status": "error",
                        "bucket": bucket,
                        "domain": domain,
                        "type": domain_type,
                        "message": f"Failed to bind playback domain: {text}",
                        "status_code": status
                    }
  • register_tools function creates _ToolImpl instance and calls tools.auto_register_tools including bind_play_domain tool
    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,
            ]
        )
  • load function instantiates LiveStreamingService and calls register_tools to register all live streaming 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?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It mentions that binding 'allows you to configure the domain for playing back streams' but lacks critical details such as required permissions, whether this operation is idempotent or reversible, potential side effects (e.g., impact on existing configurations), or error conditions. This is a significant gap for a mutation tool with zero 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, consisting of two sentences that directly state the tool's purpose and benefit. There is no redundant information, and it efficiently communicates the core functionality without unnecessary elaboration.

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 complexity of a domain-binding operation for live streaming, the description is incomplete. No annotations are provided to cover behavioral aspects, and there is no output schema to explain return values. The description fails to address key contextual elements like authentication requirements, rate limits, or what happens after binding (e.g., propagation time, verification steps), making it inadequate for safe and effective tool invocation.

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 (bucket, domain, domain_type) with clear descriptions. The description adds no additional semantic context beyond what's in the schema, such as explaining the relationship between parameters or providing examples beyond the schema's domain example. Baseline 3 is appropriate when the schema does the heavy lifting.

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 ('Bind') and the resources involved ('a playback domain to a LiveStreaming bucket'), specifying the purpose for live streaming configuration. It distinguishes from the sibling tool 'live_streaming_bind_push_domain' by focusing on playback rather than push domains, though this differentiation is implicit rather than explicit.

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 does not mention prerequisites (e.g., needing an existing bucket or domain), exclusions, or compare it to related tools like 'live_streaming_get_play_urls' or 'live_streaming_create_stream', leaving the agent to infer usage context.

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