get_cache_stats
Retrieve cache statistics and performance metrics to monitor and optimize the YouTube Transcript DL MCP Server’s transcript retrieval efficiency.
Instructions
Get cache statistics and performance metrics
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server/mcp-server.ts:321-330 (handler)The primary handler function for the 'get_cache_stats' tool. It calls the transcript service to get cache stats and formats the response as MCP content.private async handleGetCacheStats() { const stats = this.transcriptService.getCacheStats(); return { content: [{ type: 'text', text: JSON.stringify(stats, null, 2) }] }; }
- src/server/mcp-server.ts:206-213 (registration)Tool registration in the listAvailableTools method, defining the tool name, description, and input schema (empty object since no params required).{ name: 'get_cache_stats', description: 'Get cache statistics and performance metrics', inputSchema: { type: 'object', properties: {} } },
- src/server/mcp-server.ts:209-212 (schema)Input schema definition for the get_cache_stats tool, specifying an empty object since the tool takes no parameters.inputSchema: { type: 'object', properties: {} }
- Supporting method in the transcript service that delegates to the cache instance's getStats() method to retrieve statistics.public getCacheStats() { return this.cache.getStats();