Skip to main content
Glama

get_cache_stats

Retrieve cache statistics to monitor and analyze data storage efficiency within the Memory Cache Server, optimizing token usage during language model interactions.

Instructions

Get cache statistics

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool handler for get_cache_stats: retrieves stats from CacheManager and returns formatted JSON.
    case 'get_cache_stats': { const stats = this.cacheManager.getStats(); return { content: [ { type: 'text', text: JSON.stringify(stats, null, 2), }, ], }; }
  • src/index.ts:148-155 (registration)
    Tool registration in listTools handler, defining name, description, and empty input schema.
    { name: 'get_cache_stats', description: 'Get cache statistics', inputSchema: { type: 'object', properties: {}, }, },
  • Core helper method that provides the cache statistics used by the tool handler.
    getStats(): CacheStats { return { ...this.stats }; }

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/tosin2013/mcp-memory-cache-server'

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