Skip to main content
Glama
efikuta
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);

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