Skip to main content
Glama

get_cache_stats

Retrieve statistics about query cache performance and usage to monitor memory management effectiveness.

Instructions

獲取查詢緩存統計信息

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • src/index.js:197-205 (registration)
    Registers the get_cache_stats tool with empty input schema, system scope, and a handler that delegates to queryCache.getStats() for retrieving query cache statistics.
    registerTool({ name: 'get_cache_stats', description: '獲取查詢緩存統計信息', inputSchema: z.object({}), scope: 'system', async handler() { return queryCache.getStats(); } }, 'system');
  • The getStats() method of QueryCache class that returns detailed statistics including hits, misses, hit rate, current size, and maximum size.
    getStats() { const total = this.hits + this.misses; const hitRate = total > 0 ? (this.hits / total * 100).toFixed(2) : 0; return { hits: this.hits, misses: this.misses, total, hitRate: `${hitRate}%`, size: this.cache.size, maxSize: this.maxSize }; }

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

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