get_cache_stats
Retrieve cache statistics and performance metrics for the YouTube transcript download server to monitor efficiency and track usage patterns.
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 main handler function for the 'get_cache_stats' tool. It calls the transcript service to get cache statistics and returns them as a formatted JSON text response.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)Registration of the 'get_cache_stats' tool in the list of available tools, including its name, description, and empty input schema.{ 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, which requires no parameters.inputSchema: { type: 'object', properties: {} }
- Helper method in YouTubeTranscriptService that retrieves cache statistics by delegating to the underlying Cache instance.public getCacheStats() { return this.cache.getStats(); }