Skip to main content
Glama
jedarden

YouTube Transcript DL MCP Server

by jedarden

format_transcript

Convert YouTube transcript data into text, JSON, or SRT formats for accessibility and integration needs.

Instructions

Format existing transcript data into different formats

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
transcriptYesTranscript data to format
formatYesOutput formatjson

Implementation Reference

  • MCP tool handler that validates input parameters and delegates formatting to the YouTubeTranscriptService.
    private async handleFormatTranscript(args: any) {
      const { transcript, format } = args;
      
      if (!transcript || !format) {
        throw new McpError(ErrorCode.InvalidParams, 'transcript and format are required');
      }
    
      const result = this.transcriptService.formatTranscript(transcript, format);
      
      return {
        content: [{
          type: 'text',
          text: result
        }]
      };
    }
  • Core implementation of the transcript formatting logic, supporting 'text', 'json', and 'srt' output formats.
    public formatTranscript(
      transcript: TranscriptItem[],
      format: 'text' | 'json' | 'srt'
    ): string {
      switch (format) {
      case 'text':
        return transcript.map(item => item.text).join(' ');
        
      case 'json':
        return JSON.stringify(transcript, null, 2);
        
      case 'srt':
        return transcript.map((item, index) => {
          const start = this.secondsToSrtTime(item.start);
          const end = this.secondsToSrtTime(item.start + item.duration);
          return `${index + 1}\n${start} --> ${end}\n${item.text}\n`;
        }).join('\n');
        
      default:
        return JSON.stringify(transcript, null, 2);
      }
    }
  • Registration of the 'format_transcript' tool in the MCP server, including description and input schema.
    {
      name: 'format_transcript',
      description: 'Format existing transcript data into different formats',
      inputSchema: {
        type: 'object',
        properties: {
          transcript: {
            type: 'array',
            items: {
              type: 'object',
              properties: {
                text: { type: 'string' },
                start: { type: 'number' },
                duration: { type: 'number' }
              }
            },
            description: 'Transcript data to format'
          },
          format: {
            type: 'string',
            enum: ['text', 'json', 'srt'],
            description: 'Output format',
            default: 'json'
          }
        },
        required: ['transcript', 'format']
      }
    },
  • Input schema defining the parameters for the format_transcript tool: transcript array and format enum.
      type: 'object',
      properties: {
        transcript: {
          type: 'array',
          items: {
            type: 'object',
            properties: {
              text: { type: 'string' },
              start: { type: 'number' },
              duration: { type: 'number' }
            }
          },
          description: 'Transcript data to format'
        },
        format: {
          type: 'string',
          enum: ['text', 'json', 'srt'],
          description: 'Output format',
          default: 'json'
        }
      },
      required: ['transcript', 'format']
    }
Behavior2/5

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

No annotations are provided, so the description carries full burden. It states the tool formats data but doesn't disclose behavioral traits such as whether it's read-only, if it modifies input data, performance characteristics, or error handling. This is a significant gap 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, efficient sentence that front-loads the core purpose without waste. It's appropriately sized for the tool's complexity, with every word earning its place.

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

Completeness3/5

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

Given no annotations, no output schema, and 2 parameters with full schema coverage, the description is minimally adequate. It states the purpose but lacks behavioral context and output details, making it incomplete for a formatting tool that might have side effects or specific return formats.

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 both parameters well-documented in the schema. The description adds no additional meaning beyond the schema, such as explaining format details or transcript structure. Baseline 3 is appropriate as the schema does the heavy lifting.

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 'format' and the resource 'existing transcript data', specifying it transforms data into different formats. It distinguishes from siblings like 'get_transcript' or 'list_transcripts' by focusing on formatting rather than retrieval, though it doesn't explicitly name alternatives for differentiation.

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. It doesn't mention prerequisites (e.g., needing transcript data first), exclusions, or compare with siblings like 'get_bulk_transcripts' for bulk operations. Usage is implied but not specified.

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