Skip to main content
Glama
baidu-xiling

Baidu Digital Human MCP Server

Official
by baidu-xiling

getLite2dGeneralStatus

Check the status of 2D digital human generation tasks or query available 2D avatars by providing an ID or using filter parameters.

Instructions

#工具说明:根据2D小样本数字人对应的人像ID,查询该任务目前的状态,也可以用于查询有哪些可用的2D人像。

样例1:

用户输入:查一下id为xxx的数字人好了没有。 思考过程: 1.用户想要查询人像生成任务的状态,需要使用“getLite2dGeneralStatus”工具。 2.工具需要,figureId,systemFigure,trainSuccess,pageNo,ppageSize这些参数。 3.用户提到了ID为xxx,所以figureId的值为xxx,现在不清楚这个任务的状态,所以trainSuccess的值不需要填,系统人像不需要生成过程,所以systemFigure值为false,其他为默认值。

样例2:

用户输入:我可以用哪些人像 思考过程: 1.用户想要查询哪些人像ID可以使用,需要使用“getLite2dGeneralStatus”工具。 2.工具需要,figureId,systemFigure,trainSuccess,pageNo,ppageSize这些参数。 3.查询可用人像,所以figureId为空,syste Figure为空,trainSuccess为ture,pageNo默认为1,避免漏查pageSize为最大值100。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
figureIdNo人像ID
systemFigureNo是否是平台公共人像,true返回平台公共人像,false返回定制人像,空查询全部
trainSuccessNo是否查询训练完成:true:只返回可用人像,false:只返回排队中、训练中或训练失败的定制人像,为空不进行过滤

Implementation Reference

  • The MCP tool handler function that executes the logic: obtains DH API client and calls the underlying get_lite2d_general_status method.
    async def getLite2dGeneralStatus(
            figureId: Annotated[str, Field(description="人像ID", default=None)],
            systemFigure: Annotated[Optional[bool], \
                    Field(description="是否是平台公共人像,true返回平台公共人像,false返回定制人像,空查询全部", default=None)],
            trainSuccess: Annotated[bool, \
                    Field(description="是否查询训练完成:true:只返回可用人像,false:只返回排队中、训练中或训练失败的定制人像,为空不进行过滤",
                          default=None)]) \
            -> MCPLite2DStatusResponse:
        """
        Retrieve the status of a lite2d General video via the DH API.
    
        Args:
            figureId: 人像ID
    
        Returns:
            任务状态
        """
        try:
            client = await getDhClient()
            ret = await client.get_lite2d_general_status(figureId, systemFigure, trainSuccess)
            return ret
        except Exception as e:
            return MCPVideoStatusResponse(error=str(e))
  • MCP tool registration with name, description, and input schema defined via function parameters.
    @mcp.tool(
        name="getLite2dGeneralStatus",
        description=(
        """
    #工具说明:根据2D小样本数字人对应的人像ID,查询该任务目前的状态,也可以用于查询有哪些可用的2D人像。
    # 样例1:
    用户输入:查一下id为xxx的数字人好了没有。
    思考过程:
    1.用户想要查询人像生成任务的状态,需要使用“getLite2dGeneralStatus”工具。
    2.工具需要,figureId,systemFigure,trainSuccess,pageNo,ppageSize这些参数。
    3.用户提到了ID为xxx,所以figureId的值为xxx,现在不清楚这个任务的状态,所以trainSuccess的值不需要填,系统人像不需要生成过程,所以systemFigure值为false,其他为默认值。
    # 样例2:
    用户输入:我可以用哪些人像
    思考过程:
    1.用户想要查询哪些人像ID可以使用,需要使用“getLite2dGeneralStatus”工具。
    2.工具需要,figureId,systemFigure,trainSuccess,pageNo,ppageSize这些参数。
    3.查询可用人像,所以figureId为空,syste
    Figure为空,trainSuccess为ture,pageNo默认为1,避免漏查pageSize为最大值100。
        """)
    )
  • Pydantic model defining the output schema for the tool response.
    class MCPLite2DStatusResponse(BaseDHResponse):
        """ MCP 2D小样本数字人状态响应 """
        figureId: Optional[str] = None
        name: Optional[str] = None
        customizeType: Optional[str] = None
        systemFigure: Optional[bool] = None
        keepBackground: Optional[bool] = None
        gender: Optional[str] = None
        resolutionWidth: Optional[int] = None
        resolutionHeight: Optional[int] = None
        templateVideoUrl: Optional[str] = None
        maskVideoUrl: Optional[str] = None
        status: Optional[str] = None
        failedMessage: Optional[str] = None
  • Underlying DH API client helper method that performs the actual API call to query lite2d general status.
    async def get_lite2d_general_status(self, figureId: str, systemFigure: bool = None, trainSuccess: bool = None) \
            -> MCPLite2DStatusResponse:
        """ 2D 小样本数字人生成状态 """
        async def api_call():
            # fix in the future: systemFigure, trainSuccess
            endpoint = f"api/digitalhuman/open/v1/figure/lite2d/query?figureId={figureId}"
            return await self._make_request(endpoint)
    
        ret = await self._handle_api_request(
            api_call=api_call,
            response_model_class=Lite2dStatusResponse,
            mcp_response_class=MCPLite2DStatusResponse,
            error_msg="No video generation data returned.",
            figureId=lambda d: d.result[0].figureId,
            name=lambda d: d.result[0].name,
            status=lambda d: d.result[0].status,
            templateVideoUrl=lambda d: d.result[0].templateVideoUrl,
            failedMessage=lambda d: d.result[0].failedMessage,
            systemFigure=lambda d: d.result[0].systemFigure,
            gender=lambda d: d.result[0].gender,
        )
        return ret
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. While it explains the dual-purpose nature and provides example parameter configurations, it doesn't describe important behavioral aspects: whether this is a read-only operation (implied but not stated), what the response format looks like, pagination behavior (mentioned in examples but not explained), error conditions, or rate limits. The examples help but don't constitute comprehensive behavioral transparency.

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

Conciseness3/5

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

The description is front-loaded with a clear purpose statement, but includes lengthy example sections with detailed '思考过程' (thought process) that could be more concise. While the examples are helpful, they contain redundant explanations and could be streamlined. The structure is logical (purpose → examples) but the examples themselves are verbose and could be condensed while preserving their instructional value.

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 dual-purpose nature (status queries AND listing available figures), 3 parameters, no annotations, and no output schema, the description is moderately complete. It covers the main use cases and parameter interactions well through examples, but lacks information about response format, error handling, and pagination details (though pagination parameters are mentioned in examples). For a tool with no output schema, more information about what to expect in return would be beneficial.

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

Parameters4/5

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

The input schema has 100% description coverage, providing good baseline documentation for all 3 parameters. The description adds significant value beyond the schema by explaining parameter semantics through practical examples: it shows how figureId should be set for status queries vs. listing queries, clarifies that systemFigure=false for custom figures, and demonstrates trainSuccess usage patterns. This contextual guidance helps users understand how parameters interact to achieve different outcomes.

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: '根据2D小样本数字人对应的人像ID,查询该任务目前的状态,也可以用于查询有哪些可用的2D人像' (Query the status of a 2D digital human generation task based on figure ID, or query available 2D figures). This specifies both primary and secondary uses with clear verbs ('查询' - query) and resources ('任务状态' - task status, '可用人像' - available figures). It doesn't explicitly differentiate from sibling tools like 'getFigures', but the dual-purpose nature is well-defined.

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 provides implied usage guidance through two examples: Example 1 shows when to use for checking task status (with figureId specified), and Example 2 shows when to use for listing available figures (with figureId empty and trainSuccess=true). However, it doesn't explicitly state when NOT to use this tool or mention alternatives like 'getFigures' for similar queries, leaving some ambiguity about tool 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/baidu-xiling/mcp'

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