Skip to main content
Glama
freelancernasimofficial

NasCoder Perplexity MCP Ultra-Pro

perplexity_cache_clear

Clear cached responses to ensure fresh API calls and updated information from the Perplexity AI integration.

Instructions

Clear the response cache to force fresh API calls

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler case for 'perplexity_cache_clear' tool that invokes clearCache method and formats the response as text content.
    case "perplexity_cache_clear": const clearResult = nascoderMCP.clearCache(); return { content: [{ type: "text", text: clearResult.message }] };
  • index.js:683-691 (registration)
    Registration of 'perplexity_cache_clear' tool in the TOOLS array, including empty input schema.
    { name: "perplexity_cache_clear", description: "Clear the response cache to force fresh API calls", inputSchema: { type: "object", properties: {}, required: [] } },
  • The clearCache helper method in NascoderPerplexityMCP class that flushes the NodeCache and handles errors, returning success/error message.
    // Clear cache with error handling clearCache() { try { if (this.cache) { this.cache.flushAll(); this.logger.info('Cache cleared successfully'); return { success: true, message: 'Cache cleared successfully' }; } else { return { success: true, message: 'No cache to clear (cache disabled)' }; } } catch (error) { this.logger.error('Failed to clear cache:', error.message); return { success: false, message: `Failed to clear cache: ${error.message}` }; } }

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/freelancernasimofficial/nascoder-perplexity-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server