Skip to main content
Glama

get_artifact_info

Retrieve detailed artifact set information from Wuthering Waves in Markdown format by providing the Chinese name of the artifact set.

Instructions

获取库街区上的声骸详细信息并以 Markdown 格式返回。

Args: artifact_name: 要查询的声骸套装的中文名称。 Returns: 包含声骸信息的 Markdown 字符串, 或者在找不到声骸或获取数据失败时返回错误消息。

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
artifact_nameYes

Implementation Reference

  • MCP tool registration and primary handler for 'get_artifact_info'. This is the entry point for tool execution in FastMCP, which delegates to the artifact service.
    @mcp.tool() async def get_artifact_info(artifact_name: str) -> str: """获取库街区上的声骸详细信息并以 Markdown 格式返回。 Args: artifact_name: 要查询的声骸套装的中文名称。 Returns: 包含声骸信息的 Markdown 字符串, 或者在找不到声骸或获取数据失败时返回错误消息。 """ try: _, artifact_service = get_services() return await artifact_service.get_artifact_info(artifact_name) except (DataNotFoundException, ServiceException) as e: # These exceptions already have user-friendly messages return str(e) except Exception: return f"错误:处理 '{artifact_name}' 时发生意外错误。请检查服务器日志。"
  • Core business logic implementation of get_artifact_info in ArtifactService. Retrieves data from repository, parses content, generates Markdown, and handles errors.
    async def get_artifact_info(self, artifact_name: str) -> str: """Get comprehensive artifact information. Args: artifact_name: Name of the artifact set to query. Returns: Markdown formatted artifact information. Raises: ServiceException: If artifact retrieval fails. """ try: self.logger.info(f"Getting artifact info for: {artifact_name}") # Get artifact raw data artifact_raw_data = await self._get_artifact_data(artifact_name) # Parse artifact content artifact_parsed_data = await asyncio.to_thread( self.content_parser.parse_artifact_content, artifact_raw_data ) # Generate markdown artifact_markdown = self.markdown_service.generate_artifact_markdown(artifact_parsed_data) if not artifact_markdown.strip(): self.logger.warning(f"Generated empty artifact info for: {artifact_name}") return f"成功获取 '{artifact_name}' 的声骸数据,但解析后的内容无法生成有效的 Markdown。" self.logger.info(f"Successfully generated artifact info for: {artifact_name}") return artifact_markdown except DataNotFoundException: error_msg = f"Artifact set '{artifact_name}' not found" self.logger.error(error_msg) return f"错误:未找到名为 '{artifact_name}' 的声骸套装。" except Exception as e: self.logger.error(f"Failed to get artifact info for {artifact_name}: {e}") raise ServiceException(f"Artifact info retrieval failed: {e}")
  • Type protocol/interface definition specifying the signature for get_artifact_info method.
    class ArtifactServiceProtocol(ServiceProtocol): """Protocol for artifact service.""" async def get_artifact_info(self, artifact_name: str) -> str: """Get artifact information.""" ...
  • Secondary tool dispatch/registration in HTTP transport mode handler.
    elif tool_name == "get_artifact_info": result = await artifact_service.get_artifact_info(arguments.get("artifact_name"))

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