get_insights
Analyze interactions to generate personalized learning insights and actionable recommendations, driving continuous improvement and informed decision-making through pattern recognition and machine learning.
Instructions
Get learning insights and recommendations
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp-self-learning-server.js:1172-1181 (handler)The primary handler function for the 'get_insights' MCP tool. It calls the learning engine's getInsights method and augments the response with server uptime and memory usage.async handleGetInsights() { const insights = this.learningEngine.getInsights(); return { success: true, insights, uptime: Date.now() - this.startupTime, memoryUsage: process.memoryUsage() }; }
- mcp-self-learning-server.js:975-982 (registration)Registration of the 'get_insights' tool in the MCP server's list of available tools, including name, description, and empty input schema (no parameters required).{ name: 'get_insights', description: 'Get learning insights and recommendations', inputSchema: { type: 'object', properties: {} } },
- mcp-self-learning-server.js:978-981 (schema)Input schema for the 'get_insights' tool, defining an empty object (no input parameters needed).inputSchema: { type: 'object', properties: {} }
- mcp-self-learning-server.js:553-573 (helper)Core helper method in LearningEngine class that generates the insights data: metrics, top patterns, top tools, knowledge items, and recommendations.getInsights() { const topPatterns = Array.from(this.patterns.entries()) .sort((a, b) => b[1].confidence - a[1].confidence) .slice(0, 10); const topTools = Array.from(this.metrics.toolUsageFrequency.entries()) .sort((a, b) => b[1] - a[1]) .slice(0, 5); return { metrics: this.metrics, topPatterns: topPatterns.map(([key, pattern]) => ({ key, confidence: pattern.confidence, count: pattern.count })), topTools: topTools.map(([tool, count]) => ({ tool, count })), knowledgeItems: this.knowledge.size, recommendations: this.generateGlobalRecommendations() }; }