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}` };
      }
    }
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool clears a cache to force fresh API calls, which implies a mutation operation, but doesn't disclose potential side effects (e.g., performance impact, data loss), permissions required, or rate limits. This leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single, efficient sentence that directly states the tool's purpose without any wasted words. It's front-loaded and appropriately sized for a simple tool with no parameters.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's simplicity (0 parameters, no output schema, no annotations), the description is adequate but incomplete. It explains what the tool does but lacks details on behavioral aspects like side effects or usage context, which are important for a cache-clearing operation that could impact system performance.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 0 parameters with 100% coverage, so no parameter documentation is needed. The description appropriately doesn't discuss parameters, focusing instead on the tool's purpose. This meets the baseline for tools with no parameters.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the action ('Clear') and the target resource ('response cache'), with the purpose being to 'force fresh API calls'. It's specific about what the tool does, though it doesn't explicitly differentiate from sibling tools like perplexity_analytics or perplexity_models, which appear to be unrelated operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description implies usage when fresh API calls are needed, but provides no explicit guidance on when to use this tool versus alternatives or any prerequisites. There's no mention of when-not-to-use scenarios or how it relates to sibling tools, leaving the agent to infer context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other 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