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
      });
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It only states the basic action without mentioning any behavioral traits such as rate limits, authentication requirements, pagination, or what happens if the channel doesn't exist. For a tool with no annotation coverage, this leaves significant gaps in understanding its operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise—a single sentence in Japanese that directly states the tool's function. It's front-loaded with the core purpose and contains no unnecessary words or redundancy, making it highly efficient for an AI agent to parse.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and no output schema, the description is incomplete. It doesn't explain what the tool returns (e.g., video metadata, URLs, or a list), error conditions, or how results are structured. For a tool with two parameters and no structured output documentation, this leaves too much ambiguity for effective use.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The description doesn't add any parameter-specific information beyond what's already in the schema, which has 100% coverage with clear descriptions for both parameters (channelName and limit). The baseline is 3 when schema coverage is high, as the schema adequately documents the parameters without needing extra explanation in the description.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose: 'チャンネルのビデオを取得します' (Get videos from a channel). It specifies the verb (取得/retrieve) and resource (ビデオ/videos) with channel context. However, it doesn't differentiate from sibling tools like 'get_clips' or 'get_streams', which also retrieve channel content, so it falls short of a perfect score.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives. With sibling tools like 'get_clips' (for clips) and 'get_streams' (for live streams), there's no indication of when video retrieval is appropriate versus these other content types. No exclusions or prerequisites are mentioned.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

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

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