clear_cache
Remove stored transcript data from the cache to free up resources or resolve inconsistencies in the YouTube Transcript DL MCP Server.
Instructions
Clear the transcript cache
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/server/mcp-server.ts:332-341 (handler)The main handler function for the 'clear_cache' MCP tool. It calls the transcript service's clearCache method and returns a success message in the required MCP format.private async handleClearCache() { this.transcriptService.clearCache(); return { content: [{ type: 'text', text: 'Cache cleared successfully' }] }; }
- src/server/mcp-server.ts:214-221 (registration)Registration of the 'clear_cache' tool in the getAvailableTools() method, including its name, description, and empty input schema.{ name: 'clear_cache', description: 'Clear the transcript cache', inputSchema: { type: 'object', properties: {} } },
- src/server/mcp-server.ts:217-220 (schema)Input schema for the 'clear_cache' tool, which requires no parameters (empty object).inputSchema: { type: 'object', properties: {} }
- Helper method in YouTubeTranscriptService that performs the actual cache clearing by calling flush() on the internal Cache instance.public clearCache(): void { this.cache.flush(); }