Skip to main content
Glama
yangbuyiya

Short Video MCP Server

by yangbuyiya

video_id_parse_tool_wrapper

Extract video metadata by parsing source and ID from 20+ platforms including TikTok and Kuaishou. Returns video information with status codes.

Instructions

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

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sourceYes
video_idYes

Implementation Reference

  • The registered MCP tool handler 'video_id_parse_tool_wrapper' decorated with @mcp.tool, providing schema description in Chinese and delegating to the core helper function.
    @mcp.tool( description=""" 根据视频来源和ID解析视频信息 参数: - source: 视频来源 - video_id: 视频ID 返回: - code: 状态码 - msg: 状态信息 - data: 视频信息 """ ) 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)
  • Core implementation of video ID parsing logic, handling input validation, calling parse_video_id from functionality, and formatting 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)}")

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