UNPKG

youtube-video-summarizer-mcp

Version:

An MCP server for YouTube video summarization with Claude

24 lines 703 B
import { youtubeClient } from "../clients/youtube-client.js"; import { formatError } from "../helpers/format-error.js"; /** * Get captions for a YouTube video */ export async function getYouTubeVideoDetails(videoUrl, lang = "en") { try { const videoId = youtubeClient.extractVideoId(videoUrl); const videoDetails = await youtubeClient.getVideoInfo(videoId); return { result: videoDetails, isError: false, error: null, }; } catch (error) { return { result: null, isError: true, error: formatError(error), }; } } //# sourceMappingURL=get-video-captions.handler.js.map