Skip to main content
Glama
jedarden

YouTube Transcript DL MCP Server

by jedarden

list_transcripts

Retrieve available transcript options for any YouTube video by providing the video ID or URL, enabling access to multiple language and format choices.

Instructions

List all available transcripts for a YouTube video

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
videoIdYesYouTube video ID or URL

Implementation Reference

  • MCP tool handler for 'list_transcripts' that validates input, calls the transcript service, and returns formatted JSON response.
    private async handleListTranscripts(args: any) {
      const { videoId } = args;
      
      if (!videoId) {
        throw new McpError(ErrorCode.InvalidParams, 'videoId is required');
      }
    
      const result = await this.transcriptService.listTranscripts(videoId);
      
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      };
  • Input schema and metadata definition for the 'list_transcripts' tool.
    {
      name: 'list_transcripts',
      description: 'List all available transcripts for a YouTube video',
      inputSchema: {
        type: 'object',
        properties: {
          videoId: {
            type: 'string',
            description: 'YouTube video ID or URL'
          }
        },
        required: ['videoId']
      }
    }
  • Registration of the 'list_transcripts' handler in the tool call switch statement.
    case 'list_transcripts':
      return await this.handleListTranscripts(args);
  • Helper method in the transcript service that executes the Python script to list transcripts and handles the response.
    public async listTranscripts(videoId: string): Promise<{
      success: boolean;
      videoId: string;
      transcripts: Array<{
        language: string;
        language_code: string;
        is_generated: boolean;
        is_translatable: boolean;
      }>;
      error?: string;
    }> {
      try {
        const cleanVideoId = this.extractVideoId(videoId);
        const command = `python3 "${this.pythonScript}" list --video-id "${cleanVideoId}"`;
        
        const { stdout, stderr } = await execAsync(command);
    
        if (stderr) {
          this.logger.warn(`Python script warning: ${stderr}`);
        }
    
        const result: PythonListResult = JSON.parse(stdout);
        return result;
    
      } catch (error) {
        this.logger.error(`Failed to list transcripts for video ${videoId}:`, error);
        return {
          success: false,
          videoId: this.extractVideoId(videoId),
          transcripts: [],
          error: error instanceof Error ? error.message : 'Unknown error'
        };
      }
    }
  • Python helper function that uses YouTubeTranscriptApi to list available transcripts for a video.
    def list_transcripts(video_id):
        """List available transcripts for a video"""
        try:
            transcript_list = YouTubeTranscriptApi.list_transcripts(video_id)
            
            transcripts = []
            for transcript in transcript_list:
                transcripts.append({
                    'language': transcript.language,
                    'language_code': transcript.language_code,
                    'is_generated': transcript.is_generated,
                    'is_translatable': transcript.is_translatable
                })
            
            return {
                'success': True,
                'videoId': video_id,
                'transcripts': transcripts
            }
            
        except Exception as e:
            return {
                'success': False,
                'videoId': video_id,
                'error': str(e),
                'transcripts': []
            }
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 states the action ('List all available transcripts') but doesn't describe what 'available' means (e.g., language options, format types), whether there are rate limits, authentication needs, or how results are returned (e.g., pagination, error handling). This leaves significant gaps for a tool with no annotation coverage.

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 a single, clear sentence that directly states the tool's purpose without any wasted words. It is front-loaded and efficiently communicates the core functionality, making it easy to parse quickly.

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 output schema, the description is incomplete. It doesn't explain what 'available transcripts' entails (e.g., multiple languages, formats), behavioral traits like rate limits, or how to interpret results. For a tool that likely returns a list of transcripts, more context is needed to guide 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?

Schema description coverage is 100%, with the single parameter 'videoId' documented as 'YouTube video ID or URL'. The description adds no additional meaning beyond this, such as examples of valid IDs or URL formats. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 verb ('List') and resource ('all available transcripts for a YouTube video'), making the purpose immediately understandable. However, it doesn't distinguish this tool from sibling tools like 'get_transcript' or 'get_bulk_transcripts', which likely have overlapping functionality but different scopes or outputs.

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 such as 'get_transcript' (which might fetch a single transcript) or 'get_bulk_transcripts' (which could handle multiple videos). It lacks explicit when/when-not instructions or prerequisites, leaving usage context implied at best.

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/jedarden/yt-transcript-dl-mcp'

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