Skip to main content
Glama
wysh3

Perplexity MCP Server

check_deprecated_code

Identify deprecated code and technical debt in legacy systems or during upgrades. Analyze code snippets and dependencies within specific technologies like React or Node.js to streamline modernization efforts.

Instructions

Automatically call this tool when reviewing legacy code, planning upgrades, or encountering warnings with real time web access. Helps identify technical debt. Example: During code reviews or before upgrading dependencies.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
codeYesThe code snippet or dependency to check
technologyNoThe technology or framework context (e.g., "React", "Node.js")

Implementation Reference

  • The handler function that implements the core logic of the 'check_deprecated_code' tool by querying the search engine with a deprecation check prompt.
    private async handleCheckDeprecatedCode(args: Record<string, unknown>): Promise<string> { const typedArgs = args as { code: string; technology?: string }; const searchResult = await this.searchEngine.performSearch( `Check if this ${typedArgs.technology || "code"} is deprecated: ${typedArgs.code}`, ); return searchResult; }
  • The schema definition for the 'check_deprecated_code' tool, including input/output schemas, description, examples, and metadata.
    name: "check_deprecated_code", description: "Automatically call this tool when reviewing legacy code, planning upgrades, or encountering warnings with real time web access. Helps identify technical debt. Example: During code reviews or before upgrading dependencies.", category: "Code Analysis", keywords: ["deprecation", "migration", "upgrade", "compatibility", "linting", "legacy", "debt"], use_cases: [ "Preparing for technology upgrades", "Maintaining backward compatibility", "Identifying technical debt", ], inputSchema: { type: "object", properties: { code: { type: "string", description: "The code snippet or dependency to check", examples: ["componentWillMount()", "var instead of let/const"], }, technology: { type: "string", description: 'The technology or framework context (e.g., "React", "Node.js")', examples: ["React 16", "Python 2.7", "Node.js 12"], }, }, required: ["code"], }, outputSchema: { type: "object", properties: { response: { type: "string", description: "The raw text response from Perplexity analyzing the code for deprecated features.", }, }, }, examples: [ { description: "React lifecycle method deprecation", input: { code: "componentWillMount() {\n // initialization code\n}", technology: "React", }, output: { response: "componentWillMount is deprecated in React 17+. Use constructor or componentDidMount instead...", }, }, ], related_tools: ["get_documentation", "search"], },
  • The registration of the 'check_deprecated_code' tool handler in the server's tool registry.
    private setupToolHandlers(): void { const toolHandlers = createToolHandlersRegistry({ chat_perplexity: this.handleChatPerplexity.bind(this), get_documentation: this.handleGetDocumentation.bind(this), find_apis: this.handleFindApis.bind(this), check_deprecated_code: this.handleCheckDeprecatedCode.bind(this), search: this.handleSearch.bind(this), extract_url_content: this.handleExtractUrlContent.bind(this), }); setupToolHandlers(this.server, toolHandlers); }
  • Type definition for the arguments accepted by the 'check_deprecated_code' tool.
    export interface CheckDeprecatedCodeArgs { code: string; technology?: string; }

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/wysh3/perplexity-mcp-zerver'

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