Skip to main content
Glama

get_character_profile

Retrieve detailed character profile information from Wuthering Waves in Markdown format by providing the character's Chinese name.

Instructions

获取库街区上的角色档案信息并以 Markdown 格式返回。

    Args:
        character_name: 要查询的角色的中文名称。

    Returns:
        包含角色档案信息的 Markdown 字符串,
        或者在找不到角色或获取数据失败时返回错误消息。
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
character_nameYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • Primary handler function for the 'get_character_profile' MCP tool, registered with @mcp.tool(). Proxies the call to the character service after basic error handling.
    @mcp.tool()
    async def get_character_profile(character_name: str) -> str:
        """获取库街区上的角色档案信息并以 Markdown 格式返回。
    
        Args:
            character_name: 要查询的角色的中文名称。
    
        Returns:
            包含角色档案信息的 Markdown 字符串,
            或者在找不到角色或获取数据失败时返回错误消息。
        """
        try:
            character_service, _ = get_services()
            return await character_service.get_character_profile(character_name)
        except (DataNotFoundException, ServiceException) as e:
            # These exceptions already have user-friendly messages
            return str(e)
        except Exception:
            return f"错误:处理 '{character_name}' 档案时发生意外错误。请检查服务器日志。"
  • Core business logic implementation in CharacterService class. Retrieves raw character data from repository, parses the profile content, generates Markdown output, and handles errors appropriately.
    async def get_character_profile(self, character_name: str) -> str:
        """Get character profile information only.
    
        Args:
            character_name: Name of the character to query.
    
        Returns:
            Markdown formatted character profile.
    
        Raises:
            ServiceException: If character profile retrieval fails.
        """
        try:
            self.logger.info(f"Getting character profile for: {character_name}")
    
            # Get character raw data
            character_raw_data = await self._get_character_data(character_name)
    
            # Parse profile content
            character_profile_data = await asyncio.to_thread(
                self.content_parser.parse_character_profile, character_raw_data
            )
    
            # Generate markdown
            profile_markdown = self.markdown_service.generate_character_markdown(
                character_profile_data, include_strategy=False
            )
    
            if not profile_markdown.strip():
                self.logger.warning(f"Generated empty profile for: {character_name}")
                return f"成功获取 '{character_name}' 的档案数据,但解析后的内容无法生成有效的 Markdown。"
    
            self.logger.info(f"Successfully generated character profile for: {character_name}")
            return profile_markdown
    
        except DataNotFoundException:
            error_msg = f"Character '{character_name}' not found"
            self.logger.error(error_msg)
            return f"错误:未找到名为 '{character_name}' 的角色。"
    
        except Exception as e:
            self.logger.error(f"Failed to get character profile for {character_name}: {e}")
            raise ServiceException(f"Character profile retrieval failed: {e}")
  • Type signature definition in CharacterServiceProtocol interface, defining the expected input (str character_name) and output (str) for the method.
    async def get_character_profile(self, character_name: str) -> str:
        """Get character profile information."""
        ...
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool fetches and returns data in Markdown format, and mentions error handling for missing characters or failures. However, it lacks details on authentication needs, rate limits, data sources, or whether it's read-only (implied but not explicit). For a tool with zero annotation coverage, this is insufficient.

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 and front-loaded, starting with the core purpose. The Args and Returns sections are structured but could be more integrated. There's minimal waste, though the formatting with indentation is slightly verbose. Overall, it's efficient for its content.

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 low complexity (1 parameter, no nested objects) and the presence of an output schema (which handles return values), the description is moderately complete. It covers the basic purpose and parameter semantics but lacks usage guidelines and behavioral details like error types or data freshness. With no annotations, it should do more to compensate.

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 description adds significant meaning beyond the input schema, which has 0% coverage. It specifies that 'character_name' is '要查询的角色的中文名称' (the Chinese name of the character to query), clarifying language and context. With only one parameter and no schema descriptions, this compensation is effective, though not exhaustive (e.g., no format examples).

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: '获取库街区上的角色档案信息并以 Markdown 格式返回' (Get character profile information from the library district and return it in Markdown format). This specifies the verb (get), resource (character profile), and output format (Markdown). However, it doesn't explicitly differentiate from sibling tools like 'get_character_info', which likely serves a similar purpose.

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 mentions the parameter 'character_name' and what happens on success/failure, but offers no context about prerequisites, when to choose this over 'get_character_info', or any usage constraints. This leaves the agent without direction on 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/jacksmith3888/wuwa-mcp-server'

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