Skip to main content
Glama

get_clips

Retrieve Twitch clips from specific channels to analyze content performance or gather highlights for review and sharing.

Instructions

クリップの情報を取得します

Input Schema

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

Implementation Reference

  • The handler function that fetches clips for the specified channel using Twitch API, resolves the broadcaster ID, retrieves clips, maps them to a simplified format, and returns formatted response.
    export async function handleGetClips( apiClient: ApiClient, args: { channelName: string; limit?: number } ) { const user = await getUserByName(apiClient, args.channelName); const clips = await apiClient.clips.getClipsForBroadcaster(user.id, { limit: args.limit }); return formatResponse( clips.data.map(clip => ({ id: clip.id, url: clip.url, embedUrl: clip.embedUrl, broadcasterId: clip.broadcasterId, broadcasterName: clip.broadcasterDisplayName, creatorId: clip.creatorId, creatorName: clip.creatorDisplayName, videoId: clip.videoId, gameId: clip.gameId, language: clip.language, title: clip.title, viewCount: clip.views, creationDate: clip.creationDate, thumbnailUrl: clip.thumbnailUrl, duration: clip.duration, })) ); }
  • Tool definition including name, description, and input schema for validating arguments: channelName (required) and optional limit.
    { name: 'get_clips', description: 'クリップの情報を取得します', inputSchema: { type: 'object', properties: { channelName: { type: 'string', description: 'Twitchチャンネル名', }, limit: { type: 'number', description: '取得する最大クリップ数(デフォルト: 20)', minimum: 1, maximum: 100, }, }, required: ['channelName'], }, },
  • src/index.ts:136-140 (registration)
    Registration in the MCP server's CallToolRequestSchema handler switch statement, dispatching 'get_clips' calls to the handleGetClips function.
    case 'get_clips': return await handleGetClips(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