Skip to main content
Glama
MikeyBeez

MCP Contemplation

by MikeyBeez

get_memory_stats

Retrieve memory usage statistics from MCP Contemplation to monitor and analyze cognitive processing resources during continuous background operations.

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 count, aggregated patterns, memory limit, 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:450-456 (registration)
    Tool registration in the ListToolsRequestHandler, defining the name, description, and empty input schema.
    name: 'get_memory_stats', description: 'Get memory usage statistics', inputSchema: { type: 'object', properties: {}, }, },
  • The tool dispatcher case in CallToolRequestHandler that invokes the getMemoryStats method 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) }], }; }
  • Input schema definition for the get_memory_stats tool (empty object, no parameters required).
    inputSchema: { type: 'object', properties: {}, }, },

Other Tools

Related Tools

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