Skip to main content
Glama
jedarden

YouTube Transcript DL MCP Server

by jedarden

get_playlist_transcripts

Extract transcripts from all videos in a YouTube playlist in multiple formats and languages for analysis or archiving.

Instructions

Extract transcripts from all videos in a YouTube playlist

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
playlistIdYesYouTube playlist ID or URL
languageNoLanguage code (e.g., "en", "es", "fr")en
outputFormatNoOutput formatjson
includeMetadataNoInclude metadata in response

Implementation Reference

  • Primary handler function implementing the core logic for fetching transcripts from a YouTube playlist (currently a stub requiring YouTube Data API integration)
    public async getPlaylistTranscripts(
      request: PlaylistTranscriptRequest
    ): Promise<BulkTranscriptResponse> {
      try {
        // Extract playlist ID
        const playlistId = this.extractPlaylistId(request.playlistId);
        
        // Get video IDs from playlist (this would need YouTube Data API)
        // For now, we'll throw an error indicating this needs API key
        throw new Error('Playlist processing requires YouTube Data API key. Please extract video IDs manually.');
        
      } catch (error) {
        this.logger.error(`Failed to process playlist ${request.playlistId}:`, error);
        return {
          results: [],
          errors: [{
            videoId: request.playlistId,
            error: error instanceof Error ? error.message : 'Unknown error'
          }],
          summary: {
            total: 0,
            successful: 0,
            failed: 1
          }
        };
      }
    }
  • MCP server-side handler that validates input, constructs the request, calls the transcript service, and formats the MCP response
    private async handleGetPlaylistTranscripts(args: any) {
      const { playlistId, language = 'en', outputFormat = 'json', includeMetadata = true } = args;
      
      if (!playlistId) {
        throw new McpError(ErrorCode.InvalidParams, 'playlistId is required');
      }
    
      const request = {
        playlistId,
        language,
        outputFormat,
        includeMetadata
      };
    
      const result = await this.transcriptService.getPlaylistTranscripts(request);
      
      return {
        content: [{
          type: 'text',
          text: JSON.stringify(result, null, 2)
        }]
      };
    }
  • Tool registration in the MCP server's available tools list, including description and input schema
      name: 'get_playlist_transcripts',
      description: 'Extract transcripts from all videos in a YouTube playlist',
      inputSchema: {
        type: 'object',
        properties: {
          playlistId: {
            type: 'string',
            description: 'YouTube playlist ID or URL'
          },
          language: {
            type: 'string',
            description: 'Language code (e.g., "en", "es", "fr")',
            default: 'en'
          },
          outputFormat: {
            type: 'string',
            enum: ['text', 'json', 'srt'],
            description: 'Output format',
            default: 'json'
          },
          includeMetadata: {
            type: 'boolean',
            description: 'Include metadata in response',
            default: true
          }
        },
        required: ['playlistId']
      }
    },
  • TypeScript interface defining the input parameters for the getPlaylistTranscripts method
    export interface PlaylistTranscriptRequest {
      playlistId: string;
      outputFormat: 'text' | 'json' | 'srt';
      language?: string;
      includeMetadata?: boolean;
    }
  • TypeScript interface defining the output response structure for bulk/playlist transcript requests
    export interface BulkTranscriptResponse {
      results: TranscriptResponse[];
      errors: Array<{
        videoId: string;
        error: string;
      }>;
      summary: {
        total: number;
        successful: number;
        failed: number;
      };
    }
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure but offers minimal information. It states what the tool does ('Extract transcripts') but doesn't describe how it behaves - no mention of rate limits, authentication requirements, error handling, processing time, or what happens with invalid playlist IDs. For a tool that likely makes external API calls, this is inadequate.

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, focused sentence that efficiently communicates the core functionality without unnecessary words. It's front-loaded with the main action and resource, making it immediately scannable and easy to understand at a glance.

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?

For a tool with 4 parameters, no annotations, and no output schema, the description is insufficiently complete. It doesn't explain what the output looks like (especially important with format options), doesn't mention error conditions or limitations, and provides no context about the extraction process. The agent would need to guess about many behavioral aspects.

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%, so all parameters are documented in the schema itself. The description doesn't add any parameter-specific information beyond what's in the schema (e.g., it doesn't explain what 'includeMetadata' actually includes or provide examples of playlist ID formats). This meets the baseline for high schema coverage but doesn't enhance understanding.

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 action ('Extract transcripts') and target resource ('from all videos in a YouTube playlist'), making the purpose immediately understandable. However, it doesn't explicitly differentiate from sibling tools like 'get_transcript' (single video) or 'get_bulk_transcripts' (multiple videos), which would require more specific scoping language to achieve 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 like 'get_transcript' for single videos or 'get_bulk_transcripts' for multiple videos without playlist context. There's no mention of prerequisites, limitations, or typical use cases, leaving the agent to infer usage from the tool name alone.

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