Skip to main content
Glama
baidu-xiling

Baidu Digital Human MCP Server

Official
by baidu-xiling

getFigures

Retrieve available digital human avatar IDs from the Baidu Xiling platform to select characters for video generation, voice cloning, or speech synthesis projects.

Instructions

#工具说明:查询可用的人像ID

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
systemFigureNo是否是平台公共人像,true返回平台公共人像,false返回定制人像,空查询全部

Implementation Reference

  • Primary handler function for the 'getFigures' MCP tool, including registration decorator (@mcp.tool with name and description), inline input schema (Annotated parameter), execution logic (calls DH client), and error handling.
    @mcp.tool(
        name="getFigures",
        description=(
        """
    #工具说明:查询可用的人像ID
        """)
    )
    async def getFigures(
            systemFigure: Annotated[Optional[bool],
                Field(description="是否是平台公共人像,true返回平台公共人像,false返回定制人像,空查询全部", default=None)]
    ) -> MCPFiguresResponse:
        """
        Get the list of available figures via DH API.
    
        Args:
            systemFigure: 是否是平台公共人像,true返回平台公共人像,false返回定制人像,空查询全部
        """
        try:
            client = await getDhClient()
            ret = await client.get_figures(systemFigure)
            return ret
        except Exception as e:
            return MCPFiguresResponse(error=str(e))
  • Pydantic model defining the output schema/response structure for the getFigures tool (MCPFiguresResponse with figures list).
    class MCPFiguresResponse(BaseDHResponse):
        """ MCP 人像列表响应 """
        figures: Optional[List[FigureInfo]] = None
  • Supporting DH API client method implementing the core logic to query the figures API endpoint, transform response, and handle errors.
        async def get_figures(self, isSys: Annotated[Optional[bool], Field(default=None)],
                              trainSuccess: bool = True) -> MCPFiguresResponse:
            """Get the list of available voices from the API."""
    
            async def api_call():
                param = "" if isSys is None else "true" if isSys else "false"
                param2 = "true" if trainSuccess else "false"
                return await self._make_request(f"api/digitalhuman/open/v1/figure/lite2d/query?\
    pageNo=1&pageSize=100&systemFigure={param}&trainSuccess={param2}")
    
            def transform_data(data, mcp_class):
                return mcp_class(figures=data.result if len(data.result) > 0 else None)
    
            return await self._handle_api_request(
                api_call=api_call,
                response_model_class=FigureResponse,
                mcp_response_class=MCPFiguresResponse,
                error_msg="No voices found.",
                transform_func=transform_data,
            )
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 only states the tool queries portrait IDs, without mentioning whether this is a read-only operation, if it requires authentication, what the return format looks like, or any rate limits. For a query tool with zero annotation coverage, this leaves critical behavioral traits undocumented.

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 extremely concise—just one phrase in Chinese. While this avoids waste, it's arguably under-specified rather than efficiently structured. It lacks front-loading of key details and doesn't provide a complete overview, making it feel sparse rather than optimally concise.

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 (a query operation with one parameter) and the absence of both annotations and an output schema, the description is incomplete. It doesn't explain what the tool returns, how results are formatted, or any behavioral nuances. For a tool with no structured output documentation, the description should provide more context to be fully helpful.

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, with the single parameter 'systemFigure' well-documented in the schema itself. The description adds no additional parameter information beyond what's in the schema, so it meets the baseline of 3 where the schema does the heavy lifting. No compensation is needed given the high coverage.

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's purpose as '查询可用的人像ID' (query available portrait IDs), which provides a basic verb+resource combination. However, it's somewhat vague about what 'available portrait IDs' means in practice, and it doesn't differentiate this tool from sibling tools like 'getVoices' or other query tools. The description is functional but lacks specificity about scope or context.

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. There are multiple sibling query tools (e.g., getVoices, getDh123VideoStatus), but the description doesn't explain how this tool differs or when it's appropriate. No context, exclusions, or prerequisites are mentioned, leaving usage unclear.

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