get_cache_stats
Retrieve cache statistics to monitor server performance and optimize resource usage for Islamic text queries.
Instructions
Get cache statistics for monitoring server performance.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "get_cache_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/services/cache.ts:267-275 (handler)The core handler function that implements the get_cache_stats tool logic by collecting and returning statistics from all caching services (tafsir, hadith, quran, recitation, search).
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 registration/dispatch in the executeTool switch statement, which calls the getAllCacheStats handler when 'get_cache_stats' is invoked.
case 'get_cache_stats': { result = getAllCacheStats(); break; } - MCP tool definition including name, description, and empty input schema (no parameters required).
{ name: 'get_cache_stats', description: 'Get cache statistics for monitoring server performance.', inputSchema: { type: 'object', properties: {}, }, },