Skip to main content
Glama
efikuta

YouTube Knowledge MCP

by efikuta

generate_learning_path

Create structured learning paths from YouTube videos with difficulty assessment and optional quizzes to guide skill development.

Instructions

Generate AI-powered learning paths from YouTube content with difficulty assessment

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesTopic or subject for the learning path
targetLevelNoTarget skill level for the learning pathbeginner
maxVideosNoMaximum number of videos to include
includeQuizzesNoWhether to generate quiz questions

Implementation Reference

  • Main handler function execute() that orchestrates the entire learning path generation process: caching, video search, analysis, LLM sequencing, and enhancement.
    async execute(args: unknown): Promise<LearningPath> {
      const params = GenerateLearningPathSchema.parse(args);
      
      this.logger.info(`Generating learning path for: "${params.query}" (${params.targetLevel} level)`);
    
      // Generate cache key
      const cacheKey = `learning_path:${Buffer.from(JSON.stringify(params)).toString('base64')}`;
    
      // Check cache first
      const cached = await this.cache.get<LearningPath>(cacheKey);
      if (cached) {
        this.logger.info(`Returning cached learning path for: "${params.query}"`);
        return cached;
      }
    
      try {
        // Step 1: Search for relevant videos
        const searchResults = await this.searchRelevantVideos(params);
        
        // Step 2: Analyze and rank videos
        const rankedVideos = await this.analyzeAndRankVideos(searchResults, params);
        
        // Step 3: Generate learning sequence using LLM
        const learningPath = await this.generateLearningSequence(rankedVideos, params);
        
        // Step 4: Enhance with additional metadata
        const enhancedPath = await this.enhanceLearningPath(learningPath, params);
        
        // Cache the result
        await this.cache.set(cacheKey, enhancedPath, 7200); // 2 hours cache
        
        this.logger.info(`Learning path generated for "${params.query}": ${enhancedPath.videos.length} videos`);
        
        return enhancedPath;
    
      } catch (error) {
        this.logger.error(`Failed to generate learning path for "${params.query}":`, error);
        throw error;
      }
    }
  • src/index.ts:580-582 (registration)
    Tool call handler in switch statement that invokes the LearningPathGenerator.execute() method.
    case 'generate_learning_path':
      result = await this.learningPathTool.execute(args);
      break;
  • src/index.ts:383-413 (registration)
    Tool registration in the listTools response, including name, description, and input schema.
      name: 'generate_learning_path',
      description: 'Generate AI-powered learning paths from YouTube content with difficulty assessment',
      inputSchema: {
        type: 'object',
        properties: {
          query: {
            type: 'string',
            description: 'Topic or subject for the learning path'
          },
          targetLevel: {
            type: 'string',
            enum: ['beginner', 'intermediate', 'advanced'],
            default: 'beginner',
            description: 'Target skill level for the learning path'
          },
          maxVideos: {
            type: 'number',
            minimum: 5,
            maximum: 50,
            default: 20,
            description: 'Maximum number of videos to include'
          },
          includeQuizzes: {
            type: 'boolean',
            default: false,
            description: 'Whether to generate quiz questions'
          }
        },
        required: ['query']
      }
    },
  • Zod schema definition for GenerateLearningPath tool input validation, used in handler for parsing args.
    export const GenerateLearningPathSchema = z.object({
      query: z.string().describe('Topic or subject for the learning path'),
      targetLevel: z.enum(['beginner', 'intermediate', 'advanced']).default('beginner').describe('Target difficulty level'),
      maxVideos: z.number().min(5).max(50).default(20).describe('Maximum number of videos in the path'),
      duration: z.string().optional().describe('Preferred total duration (e.g., "2 hours", "30 minutes")'),
      includeQuizzes: z.boolean().default(false).describe('Whether to generate quiz questions'),
    });
  • src/index.ts:178-182 (registration)
    Instantiation of the LearningPathGenerator handler instance in the main MCP server class.
    this.learningPathTool = new LearningPathGenerator(this.youtubeClient, this.cache, this.quotaManager, this.llmService, this.logger);
    this.commentIntentTool = new CommentIntentAnalyzer(this.youtubeClient, this.cache, this.llmService, this.logger);
    this.eli5Tool = new ELI5Simplifier(this.youtubeClient, this.cache, this.llmService, this.transcriptProcessor, this.logger);
    this.chapterTool = new ChapterGenerator(this.youtubeClient, this.cache, this.llmService, this.transcriptProcessor, this.logger);
    this.knowledgeGraphTool = new KnowledgeGraphGenerator(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?

No annotations are provided, so the description carries the full burden. It mentions 'AI-powered' and 'difficulty assessment', but doesn't disclose key behavioral traits such as how the AI selects videos, what the output format looks like, whether it requires internet access, potential rate limits, or error handling. For a tool with no annotations, 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 a single, efficient sentence that front-loads the core functionality ('Generate AI-powered learning paths') and includes key features ('from YouTube content with difficulty assessment'). There is no wasted text, making it highly concise and well-structured for quick comprehension.

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 complexity of generating learning paths with AI and no output schema, the description is incomplete. It lacks details on the output format, how videos are selected and ordered, what 'difficulty assessment' entails, and any limitations or dependencies. With no annotations and missing output information, it doesn't provide enough context 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?

Schema description coverage is 100%, so the schema fully documents all parameters. The description adds no specific parameter semantics beyond implying that 'query' relates to the learning topic and 'targetLevel' influences difficulty assessment. This meets the baseline of 3 since the schema handles the heavy lifting, but the description doesn't enhance parameter 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 ('Generate AI-powered learning paths') and resource ('from YouTube content'), with the additional feature of 'difficulty assessment'. It distinguishes itself from siblings like 'generate_video_chapters' or 'simplify_video_transcript' by focusing on structured learning paths rather than content analysis or modification. However, it doesn't explicitly differentiate from 'generate_knowledge_graph', which might also organize content.

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, such as needing YouTube content availability, or compare it to siblings like 'generate_knowledge_graph' for knowledge organization or 'search_channels' for content discovery. Usage is implied by the purpose but lacks explicit context or exclusions.

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