Skip to main content
Glama
MikeyBeez

MCP Contemplation

by MikeyBeez

get_memory_stats

Retrieve memory usage statistics to monitor and analyze system performance within the MCP Contemplation server's cognitive processing environment.

Instructions

Get memory usage statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The core handler function in ContemplationManager that computes and returns memory statistics including total insights, unused insights, high-significance insights, aggregated patterns, memory limit, significance threshold, and estimated context usage.
    getMemoryStats(): any { const total = this.insights.length; const unused = this.insights.filter(i => !i.used).length; const highSig = this.insights.filter(i => i.significance >= 8).length; const aggregated = this.insights.filter(i => i.similar_count && i.similar_count > 1).length; return { total_insights: total, unused_insights: unused, high_significance: highSig, aggregated_patterns: aggregated, memory_limit: this.maxInsightsInMemory, significance_threshold: this.significanceThreshold, estimated_context_usage: `${Math.round((total / this.maxInsightsInMemory) * 100)}%` }; }
  • src/index.ts:449-456 (registration)
    Registers the 'get_memory_stats' tool in the ListTools response, defining its name, description, and empty input schema.
    { name: 'get_memory_stats', description: 'Get memory usage statistics', inputSchema: { type: 'object', properties: {}, }, },
  • The switch case in the CallToolRequestHandler that invokes the getMemoryStats handler and formats the response as MCP content.
    case 'get_memory_stats': { const stats = contemplation.getMemoryStats(); return { content: [{ type: 'text', text: JSON.stringify(stats, null, 2) }], }; }

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/MikeyBeez/mcp-contemplation'

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