Skip to main content
Glama

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
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • 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() }; }
  • 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: {} } },
  • Input schema for the 'get_insights' tool, defining an empty object (no input parameters needed).
    inputSchema: { type: 'object', properties: {} }
  • 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() }; }

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/saralegui-solutions/mcp-self-learning-server'

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