Skip to main content
Glama
baidu-xiling

Baidu Digital Human MCP Server

Official
by baidu-xiling

getDhVideoStatus

Check the progress of digital human video synthesis by providing the task ID to monitor completion status.

Instructions

#工具说明:查询基础数字人视频合成进度。

样例1:

用户输入:查一下taskid为xxx的数字人视频好了没有 思考过程: 1.用户想要查询taskid为xxx的数字人视频好了没有,需要根据context来做判断,最近调用了“generateDhVideo”工具,需要使用“getDhVideoStatus”工具,如果没有查询到,则需要使用“getDh123VideoStatus”工具继续查询。 2.工具需要task ID这些参数。 3.task ID的值为xxx

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
taskIdNo基础数字人视频任务ID

Implementation Reference

  • The handler function that implements the core logic of the 'getDhVideoStatus' tool by querying the DH API client for video status.
    async def getDhVideoStatus(
            taskId: Annotated[str, Field(description="基础数字人视频任务ID", default=None)],
    ) -> MCPVideoStatusResponse:
        """
        Retrieve the status of a video generated via the DH API.
    
        Args:
            taskId: 任务ID
    
        Returns:
            任务状态
        """
        try:
            client = await getDhClient()
            ret = await client.get_video_status(taskId)
            return ret
        except Exception as e:
            return MCPVideoStatusResponse(error=str(e))
  • The FastMCP @mcp.tool decorator registering the 'getDhVideoStatus' tool, including its name and description.
    @mcp.tool(
        name="getDhVideoStatus",
        description=(
        """
    #工具说明:查询基础数字人视频合成进度。
    # 样例1:
    用户输入:查一下taskid为xxx的数字人视频好了没有
    思考过程:
    1.用户想要查询taskid为xxx的数字人视频好了没有,需要根据context来做判断,最近调用了“generateDhVideo”工具,\
    需要使用“getDhVideoStatus”工具,如果没有查询到,则需要使用“getDh123VideoStatus”工具继续查询。
    2.工具需要task ID这些参数。
    3.task ID的值为xxx
        """)
    )
  • Pydantic BaseModel defining the output schema (response structure) for the 'getDhVideoStatus' tool.
    class MCPVideoStatusResponse(BaseDHResponse):
        """ MCP 视频状态响应 """
        taskId: Optional[str] = None
        status: Optional[str] = None
        duration: Optional[float] = None
        videoUrl: Optional[str] = None
        requestId: Optional[str] = None
        failedCode: Optional[int] = None
        createTime: Optional[str] = None
        failedMessage: Optional[Dict[str, Any]] = None
  • The DHApiClient method that performs the actual API call to retrieve video status, used by the tool handler.
    async def get_video_status(self, taskId: str, isAdvanced: bool = False) -> MCPVideoStatusResponse:
        """Get the status of a generated video from the API."""
    
        async def api_call():
            endpoint = f"api/digitalhuman/open/v1/video/advanced/task?taskId={taskId}" \
                if isAdvanced else f"api/digitalhuman/open/v1/video/task?taskId={taskId}"
            return await self._make_request(endpoint)
    
        try:
            result = await api_call()
    
            validated_response = VideoStatusResponse.model_validate(result)
    
            data = validated_response.result
    
            error_details = None
            if validated_response.code != 0 :
                error_details = {
                    "code": validated_response.code,
                    "message": validated_response.message.global_field,
                }
    
            return MCPVideoStatusResponse(
                taskId=data.taskId,
                status=data.status,
                duration=data.duration,
                videoUrl=data.videoUrl,
                createTime=data.createTime,
                failedMessage=error_details,
            )
        except httpx.RequestError as exc:
            return MCPVideoStatusResponse(
                error=f"HTTP Request failed: {exc}"
            )
        except httpx.HTTPStatusError as exc:
            return MCPVideoStatusResponse(
                error=f"HTTP Error: {exc.response.status_code} - {exc.response.text}"
            )
        except ValidationError as ve:
            return MCPVideoStatusResponse(
                error=f"ValidationError: {ve}"
            )
        except Exception as e:
            return MCPVideoStatusResponse(
                error=f"An unexpected error occurred: {e}"
            )
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 mentions the tool queries progress but doesn't disclose behavioral traits like what the response format includes (e.g., status codes, error handling), whether it's idempotent, or any rate limits. The example implies it returns results or requires fallback, but this is vague. More details on behavior would improve transparency.

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

Conciseness2/5

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

The description is poorly structured and verbose, including a markdown header, example, and step-by-step thinking process that doesn't belong in a tool description. It's front-loaded with unnecessary commentary rather than focusing on concise, actionable information. Sentences like '思考过程:' (thinking process) add clutter without earning their place.

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 no annotations and no output schema, the description is incomplete for a tool that queries status. It lacks details on return values (e.g., what progress indicators are provided), error conditions, or how to interpret results. The example hints at fallback behavior but doesn't fully explain it. For a status-checking tool, this leaves significant gaps in understanding its operation.

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%, with the parameter 'taskId' clearly documented in the schema as '基础数字人视频任务ID' (basic digital human video task ID). The description adds minimal value beyond this, only noting in the example that '工具需要task ID这些参数' (the tool needs task ID parameters). It doesn't provide additional semantics like format constraints or usage tips, so the baseline score of 3 is appropriate.

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

Purpose3/5

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

The description states the tool '查询基础数字人视频合成进度' (query basic digital human video synthesis progress), which is a clear verb+resource combination. However, it doesn't explicitly distinguish this tool from its sibling 'getDh123VideoStatus', which appears to serve a similar purpose for a different type of digital human video. The description mentions both tools in the example but doesn't clarify their distinct scopes.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: after calling 'generateDhVideo' to check progress. It explicitly mentions 'getDh123VideoStatus' as an alternative if no results are found, offering guidance on tool selection. However, it doesn't specify when NOT to use this tool or address other potential alternatives among siblings.

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/baidu-xiling/mcp'

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