Skip to main content
Glama
yangbuyiya

Short Video MCP Server

by yangbuyiya

video_id_parse_tool_wrapper

Extract video details by parsing source and video ID from platforms like TikTok and Kuaishou. Returns status code, message, and video information for efficient data retrieval.

Instructions

根据视频来源和ID解析视频信息 参数: - source: 视频来源 - video_id: 视频ID 返回: - code: 状态码 - msg: 状态信息 - data: 视频信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
video_idYes

Implementation Reference

  • Handler function that implements the MCP tool 'video_id_parse_tool_wrapper' by calling the core parsing utility.
    async def video_id_parse_tool_wrapper(source: str, video_id: str) -> Dict[str, Any]: """根据视频来源和ID解析视频信息""" return await video_id_parse_tool(source, video_id)
  • Registration of the 'video_id_parse_tool_wrapper' tool using FastMCP's @mcp.tool decorator, including input/output schema description.
    @mcp.tool( description=""" 根据视频来源和ID解析视频信息 参数: - source: 视频来源 - video_id: 视频ID 返回: - code: 状态码 - msg: 状态信息 - data: 视频信息 """ )
  • Core helper function performing the actual video ID parsing logic using VideoSource and parse_video_id, handling errors and responses.
    async def video_id_parse_tool(source: str, video_id: str) -> Dict[str, Any]: """根据视频来源和ID解析视频信息""" if not source or not video_id: return create_error_response("视频来源和ID参数不能为空") try: video_source = VideoSource(source) video_info = await parse_video_id(video_source, video_id) logger.info(f"成功解析视频 - 来源: {source}, ID: {video_id}") return create_success_response("解析成功", video_info.__dict__) except ValueError as err: logger.error(f"视频ID解析失败: {err}") return create_error_response(f"无效的视频来源或ID: {str(err)}") except Exception as err: logger.error(f"未知错误: {err}") return create_error_response(f"解析失败: {str(err)}")

Other Tools

Related 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/yangbuyiya/yby6-crawling-short-video-mcp'

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