Skip to main content
Glama
mixelpixx

meMCP - Memory-Enhanced Model Context Protocol

memory_get_stats

Retrieve memory usage statistics for enhanced context retention and continuous learning in Large Language Models using the Model Context Protocol.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Registers the 'memory_get_stats' tool with the MCP server, including its description, input schema (empty), and handler reference.
    registerGetStatsTool(server) { server.registerTool( 'memory_get_stats', 'Get statistics about the memory system', { type: 'object', properties: {}, }, async (args) => { return await this.handleGetStats(args); } ); }
  • The core handler function that retrieves memory statistics from the factStore, formats them into a structured text response including total facts, average quality, breakdown by type and domain, and handles errors.
    async handleGetStats(args) { try { const stats = await this.factStore.getStats(); let response = `📊 **Memory System Statistics**\n\n`; response += `**Total Facts:** ${stats.totalFacts}\n`; response += `**Average Quality:** ${stats.averageQualityScore}/100\n\n`; if (Object.keys(stats.factsByType).length > 0) { response += `**Facts by Type:**\n`; for (const [type, count] of Object.entries(stats.factsByType)) { response += `- ${type.replace('_', ' ')}: ${count}\n`; } response += `\n`; } if (Object.keys(stats.factsByDomain).length > 0) { response += `**Facts by Domain:**\n`; for (const [domain, count] of Object.entries(stats.factsByDomain)) { response += `- ${domain}: ${count}\n`; } } return { content: [ { type: 'text', text: response.trim(), }, ], }; } catch (error) { return { content: [ { type: 'text', text: `Error getting stats: ${error.message}`, }, ], isError: true, }; }
  • Calls registerTools on MemoryOperations instance, which includes registration of memory_get_stats among other memory tools.
    async registerTools(server) { // Register tools from modular components this.operations.registerTools(server);
  • Delegates the handleGetStats call to the MemoryOperations instance for backward compatibility.
    async handleGetStats(args) { return await this.operations.handleGetStats(args); }

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/mixelpixx/meMCP'

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