get_cache_stats
Monitor server performance by retrieving cache statistics to track resource usage and optimize system efficiency.
Instructions
Get cache statistics for monitoring server performance.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/services/cache.ts:267-275 (handler)Core handler function that collects and returns statistics from all five cache instances (tafsir, hadith, quran, recitation, search). This is the exact implementation of the tool logic.export function getAllCacheStats() { return { tafsir: getTafsirCache().getStats(), hadith: getHadithCache().getStats(), quran: getQuranCache().getStats(), recitation: getRecitationCache().getStats(), search: getSearchCache().getStats(), }; }
- src/shared/tool-executor.ts:118-121 (registration)Tool dispatch/registration in the central executeTool switch statement, which calls the getAllCacheStats handler when 'get_cache_stats' is invoked.case 'get_cache_stats': { result = getAllCacheStats(); break; }
- Tool schema definition including name, description, and empty input schema (no parameters required). Used for MCP tool registration and validation.{ name: 'get_cache_stats', description: 'Get cache statistics for monitoring server performance.', inputSchema: { type: 'object', properties: {}, }, },