Skip to main content
Glama

get_videos

Retrieve video content from Twitch channels to access broadcasts and clips. Specify a channel name to fetch videos with configurable limits for content management.

Instructions

チャンネルのビデオを取得します

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
channelNameYesTwitchチャンネル名
limitNo取得する最大ビデオ数(デフォルト: 20)

Implementation Reference

  • The handler function that implements the core logic for fetching videos from a Twitch channel using the ApiClient, formatting the response with video details.
    export async function handleGetVideos( apiClient: ApiClient, args: { channelName: string; limit?: number } ) { const user = await getUserByName(apiClient, args.channelName); const videos = await apiClient.videos.getVideosByUser(user.id, { limit: args.limit }); return formatResponse({ total: videos.data.length, videos: videos.data.map(video => ({ id: video.id, title: video.title, description: video.description, url: video.url, thumbnailUrl: video.thumbnailUrl, viewCount: video.views, creationDate: video.creationDate, duration: video.duration, language: video.language, type: video.type, publishDate: video.publishDate, mutedSegments: video.mutedSegmentData, })), }); }
  • The tool definition including name, description, and input schema for validating arguments (channelName required, optional limit).
    { name: 'get_videos', description: 'チャンネルのビデオを取得します', inputSchema: { type: 'object', properties: { channelName: { type: 'string', description: 'Twitchチャンネル名', }, limit: { type: 'number', description: '取得する最大ビデオ数(デフォルト: 20)', minimum: 1, maximum: 100, }, }, required: ['channelName'], }, },
  • src/index.ts:147-151 (registration)
    Tool registration in the CallToolRequestSchema handler switch statement, dispatching to the handleGetVideos function.
    case 'get_videos': return await handleGetVideos(this.apiClient, { channelName: args.channelName as string, limit: args.limit as number | undefined });

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/mtane0412/twitch-mcp-server'

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