Skip to main content
Glama
efikuta

YouTube Knowledge MCP

by efikuta

simplify_video_transcript

Simplify YouTube video transcripts for specific age groups by adjusting language complexity and providing key term definitions.

Instructions

Create age-appropriate simplified versions of video transcripts (ELI5 mode)

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
videoIdYesYouTube video ID to simplify
targetAgeNoTarget age for simplification
outputFormatNoPreferred output formatparagraph
includeDefinitionsNoInclude definitions for key terms

Implementation Reference

  • Main handler logic in ELI5Simplifier.execute(): parses args with schema, fetches transcript, simplifies using LLM for target age, computes readability, caches and returns structured SimplifiedTranscript.
    async execute(args: unknown): Promise<SimplifiedTranscript> {
      const params = SimplifyVideoTranscriptSchema.parse(args);
      
      this.logger.info(`Simplifying transcript for video ${params.videoId} (target age: ${params.targetAge})`);
    
      // Generate cache key
      const cacheKey = `eli5:${params.videoId}:${params.targetAge}:${params.outputFormat}:${params.includeDefinitions}`;
    
      // Check cache first
      const cached = await this.cache.get<SimplifiedTranscript>(cacheKey);
      if (cached) {
        this.logger.info(`Returning cached ELI5 transcript for: ${params.videoId}`);
        return cached;
      }
    
      try {
        // Step 1: Get video details with transcript
        const videoDetails = await this.youtubeClient.getVideoDetails({
          videoId: params.videoId,
          includeTranscript: true,
          includeComments: false
        });
    
        if (!videoDetails.transcript || videoDetails.transcript.length === 0) {
          throw new Error(`No transcript available for video ${params.videoId}`);
        }
    
        // Step 2: Process and prepare transcript
        const processedTranscript = this.transcriptProcessor.processTranscript(videoDetails.transcript);
        
        // Step 3: Simplify using LLM
        const simplifiedContent = await this.simplifyTranscript(
          processedTranscript.fullText,
          videoDetails.video,
          params
        );
    
        // Step 4: Calculate readability improvement
        const readabilityScores = this.calculateReadabilityScores(
          processedTranscript.fullText,
          simplifiedContent.content.sections.map(s => s.content).join(' ')
        );
    
        const result: SimplifiedTranscript = {
          videoId: params.videoId,
          originalLength: processedTranscript.fullText.length,
          simplifiedLength: simplifiedContent.content.sections.map(s => s.content).join(' ').length,
          targetAge: params.targetAge,
          content: simplifiedContent.content,
          readabilityScore: readabilityScores
        };
    
        // Cache the result
        await this.cache.set(cacheKey, result, 7200); // 2 hours cache
        
        this.logger.info(`ELI5 simplification completed for ${params.videoId}. Readability improved by ${readabilityScores.improvement}%`);
        
        return result;
    
      } catch (error) {
        this.logger.error(`Failed to simplify transcript for ${params.videoId}:`, error);
        throw error;
      }
    }
  • Zod schema defining input parameters: videoId (required), targetAge (5-18, default 12), outputFormat (paragraph/bullet_points/qa, default paragraph), includeDefinitions (default true).
    export const SimplifyVideoTranscriptSchema = z.object({
      videoId: z.string().describe('YouTube video ID'),
      targetAge: z.number().min(5).max(18).default(12).describe('Target age for simplification'),
      includeDefinitions: z.boolean().default(true).describe('Include definitions for complex terms'),
      outputFormat: z.enum(['paragraph', 'bullet_points', 'qa']).default('paragraph').describe('Output format'),
    });
  • src/index.ts:443-473 (registration)
    Tool registration in MCP server's listTools handler: defines name, description, and inputSchema matching the Zod schema.
      name: 'simplify_video_transcript',
      description: 'Create age-appropriate simplified versions of video transcripts (ELI5 mode)',
      inputSchema: {
        type: 'object',
        properties: {
          videoId: {
            type: 'string',
            description: 'YouTube video ID to simplify'
          },
          targetAge: {
            type: 'number',
            minimum: 5,
            maximum: 18,
            default: 12,
            description: 'Target age for simplification'
          },
          outputFormat: {
            type: 'string',
            enum: ['paragraph', 'bullet_points', 'qa'],
            default: 'paragraph',
            description: 'Preferred output format'
          },
          includeDefinitions: {
            type: 'boolean',
            default: true,
            description: 'Include definitions for key terms'
          }
        },
        required: ['videoId']
      }
    },
  • src/index.ts:588-590 (registration)
    Switch case in callTool handler dispatching to ELI5Simplifier instance's execute method.
    case 'simplify_video_transcript':
      result = await this.eli5Tool.execute(args);
      break;
  • src/index.ts:180-180 (registration)
    Instantiation of ELI5Simplifier class instance (this.eli5Tool) used as the tool handler, injected with dependencies.
    this.eli5Tool = new ELI5Simplifier(this.youtubeClient, this.cache, this.llmService, this.transcriptProcessor, this.logger);
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. While it mentions the transformation behavior ('simplified versions'), it doesn't disclose important traits like whether this is a read-only operation (likely not, since it creates new content), potential rate limits, authentication requirements, or what the output looks like. The description is minimal and lacks operational context needed for a tool that presumably generates new content.

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 communicates the core purpose without unnecessary words. It's front-loaded with the main action and resource, and the parenthetical 'ELI5 mode' adds useful context without expanding the sentence structure. Every element earns its place.

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 content-generation tool with 4 parameters and no annotations or output schema, the description is insufficient. It doesn't explain what the output looks like, whether the simplification preserves meaning, how it handles different video lengths, or any quality considerations. The description alone doesn't provide enough context for an agent to understand the full scope and limitations of this tool.

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 schema description coverage is 100%, so all parameters are well-documented in the schema itself. The description adds no additional parameter semantics beyond what's already in the schema descriptions. It mentions 'age-appropriate' which relates to the targetAge parameter, but this is already covered in the schema. With complete schema coverage, 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.

Purpose5/5

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

The description clearly states the specific action ('Create age-appropriate simplified versions') and resource ('video transcripts'), with additional context about the simplification approach ('ELI5 mode'). It distinguishes from sibling tools like analyze_video_content or generate_video_chapters by focusing specifically on transcript simplification rather than analysis, chapter generation, or other video-related operations.

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

Usage Guidelines3/5

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

The description implies usage context through 'age-appropriate' and 'ELI5 mode', suggesting this tool is for educational or accessibility purposes. However, it doesn't explicitly state when to use this tool versus alternatives like analyze_video_content (which might provide different insights) or when not to use it (e.g., for verbatim transcripts). No specific alternatives or exclusions 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/efikuta/youtube-knowledge-mcp'

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