get_insights
Analyze interaction patterns to provide learning insights and recommendations for improving autonomous system performance through predictive suggestions.
Instructions
Get learning insights and recommendations
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- mcp-self-learning-server.js:553-573 (handler)Core implementation of getInsights in LearningEngine - computes top patterns, tool usage stats, metrics, and recommendations from the self-learning knowledge base.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() }; }
- mcp-self-learning-server.js:1172-1181 (handler)MCP tool handler method in SelfLearningMCPServer that invokes the LearningEngine to get insights and adds server metadata.async handleGetInsights() { const insights = this.learningEngine.getInsights(); return { success: true, insights, uptime: Date.now() - this.startupTime, memoryUsage: process.memoryUsage() }; }
- mcp-self-learning-server.js:976-982 (registration)Registration of the 'get_insights' tool in the MCP server's listTools response, defining name, description, and empty input schema.name: 'get_insights', description: 'Get learning insights and recommendations', inputSchema: { type: 'object', properties: {} } },
- mcp-self-learning-server.js:1075-1076 (handler)Tool call dispatcher switch case that routes 'get_insights' tool invocations to the handler method.result = await this.handleGetInsights(); break;
- mcp-self-learning-server.js:978-981 (schema)Input schema for get_insights tool (empty object, no parameters required).inputSchema: { type: 'object', properties: {} }