Skip to main content
Glama
freelancernasimofficial

NasCoder Perplexity MCP Ultra-Pro

perplexity_cache_clear

Force fresh API calls by clearing the response cache in the NasCoder Perplexity MCP Ultra-Pro server, ensuring up-to-date data and structured results.

Instructions

Clear the response cache to force fresh API calls

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • MCP tool call handler for 'perplexity_cache_clear' that invokes the clearCache method on the NascoderPerplexityMCP instance and formats the result as MCP content.
    case "perplexity_cache_clear": const clearResult = nascoderMCP.clearCache(); return { content: [{ type: "text", text: clearResult.message }] };
  • index.js:683-691 (registration)
    Registration of the 'perplexity_cache_clear' tool in the TOOLS array, including description and empty input schema (no parameters required).
    { name: "perplexity_cache_clear", description: "Clear the response cache to force fresh API calls", inputSchema: { type: "object", properties: {}, required: [] } },
  • Input schema definition for the 'perplexity_cache_clear' tool, specifying an empty object (no input parameters required).
    inputSchema: { type: "object", properties: {}, required: [] }
  • Helper method in NascoderPerplexityMCP class that clears the NodeCache by calling flushAll(), handles disabled cache cases, logs the action, and returns success/error status with message.
    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}` }; } }

Other Tools

Related Tools

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