Skip to main content
Glama
freelancernasimofficial

NasCoder Perplexity MCP Ultra-Pro

perplexity_analytics

Analyze performance metrics and usage data to monitor and optimize the integration's effectiveness and track operational insights.

Instructions

Get detailed analytics and performance metrics for the Perplexity MCP server

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler for the 'perplexity_analytics' tool call. Calls getAnalytics() on the MCP instance and returns the analytics data wrapped in the expected MCP response format.
    case "perplexity_analytics": const analytics = nascoderMCP.getAnalytics(); return { content: [{ type: "object", data: analytics }] };
  • index.js:674-682 (registration)
    Registration of the 'perplexity_analytics' tool in the TOOLS array, which is returned by the ListToolsRequestSchema handler. Includes name, description, and empty input schema since no parameters are needed.
    { name: "perplexity_analytics", description: "Get detailed analytics and performance metrics for the Perplexity MCP server", inputSchema: { type: "object", properties: {}, required: [] } },
  • Input schema for the 'perplexity_analytics' tool, which is an empty object since the tool requires no parameters.
    inputSchema: { type: "object", properties: {}, required: [] }
  • Helper method getAnalytics() that compiles and returns detailed performance metrics, including request counts, cache statistics, token usage, model usage, uptime, and memory usage.
    getAnalytics() { try { const analytics = { ...this.analytics, cacheStats: { keys: this.cache ? this.cache.keys().length : 0, hits: this.analytics.cacheHits, misses: this.analytics.cacheMisses, hitRate: this.analytics.cacheHits + this.analytics.cacheMisses > 0 ? (this.analytics.cacheHits / (this.analytics.cacheHits + this.analytics.cacheMisses) * 100) : 0 }, uptime: process.uptime(), memoryUsage: process.memoryUsage(), version: '2.0.0', apiVersion: '2025' }; return analytics; } catch (error) { this.logger.error('Failed to get analytics:', error.message); return { error: 'Failed to retrieve analytics', totalRequests: this.analytics?.totalRequests || 0, errors: this.analytics?.errors || 0 }; } }

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