Skip to main content
Glama
rileyedwards77

Perplexity AI MCP Server

check_deprecated_code

Identify deprecated features in code or dependencies to maintain compatibility and prevent issues. Specify the technology context for accurate analysis.

Instructions

Check if code or dependencies might be using deprecated features

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 for the 'check_deprecated_code' tool. It extracts the 'code' snippet and optional 'technology' from the input arguments, constructs a search query for deprecated usage, calls the Perplexity '/search' API, and returns the response data as a formatted text content block.
    case "check_deprecated_code": {
      const { code, technology = "" } = request.params.arguments as {
        code: string;
        technology?: string;
      };
      const response = await this.axiosInstance.post('/search', {
        query: `deprecated code ${code} ${technology}`
      });
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • The input schema definition for the 'check_deprecated_code' tool, specifying required 'code' parameter and optional 'technology'.
    {
      name: "check_deprecated_code",
      description:
        "Check if code or dependencies might be using deprecated features",
      inputSchema: {
        type: "object",
        properties: {
          code: {
            type: "string",
            description: "The code snippet or dependency to check",
          },
          technology: {
            type: "string",
            description:
              "The technology or framework context (e.g., 'React', 'Node.js')",
          },
        },
        required: ["code"],
      },
    },
  • index.ts:102-206 (registration)
    The tool is registered by including its definition (name, description, inputSchema) in the list returned by the ListTools handler.
        {
          name: "chat_perplexity",
          description:
            "Maintains ongoing conversations with Perplexity AI. Creates new chats or continues existing ones with full history context.",
          inputSchema: {
            type: "object",
            properties: {
              message: {
                type: "string",
                description: "The message to send to Perplexity AI",
              },
              chat_id: {
                type: "string",
                description:
                  "Optional: ID of an existing chat to continue. If not provided, a new chat will be created.",
              },
            },
            required: ["message"],
          },
        },
        {
          name: "search",
          description:
            "Perform a general search query to get comprehensive information on any topic",
          inputSchema: {
            type: "object",
            properties: {
              query: {
                type: "string",
                description: "The search query or question",
              },
              detail_level: {
                type: "string",
                description:
                  "Optional: Desired level of detail (brief, normal, detailed)",
                enum: ["brief", "normal", "detailed"],
              },
            },
            required: ["query"],
          },
        },
        {
          name: "get_documentation",
          description:
            "Get documentation and usage examples for a specific technology, library, or API",
          inputSchema: {
            type: "object",
            properties: {
              query: {
                type: "string",
                description:
                  "The technology, library, or API to get documentation for",
              },
              context: {
                type: "string",
                description:
                  "Additional context or specific aspects to focus on",
              },
            },
            required: ["query"],
          },
        },
        {
          name: "find_apis",
          description:
            "Find and evaluate APIs that could be integrated into a project",
          inputSchema: {
            type: "object",
            properties: {
              requirement: {
                type: "string",
                description:
                  "The functionality or requirement you're looking to fulfill",
              },
              context: {
                type: "string",
                description:
                  "Additional context about the project or specific needs",
              },
            },
            required: ["requirement"],
          },
        },
        {
          name: "check_deprecated_code",
          description:
            "Check if code or dependencies might be using deprecated features",
          inputSchema: {
            type: "object",
            properties: {
              code: {
                type: "string",
                description: "The code snippet or dependency to check",
              },
              technology: {
                type: "string",
                description:
                  "The technology or framework context (e.g., 'React', 'Node.js')",
              },
            },
            required: ["code"],
          },
        },
      ],
    }));
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool checks for deprecated features but doesn't describe how it performs this check, what the output looks like, any limitations (e.g., accuracy, supported technologies beyond examples), or potential impacts (e.g., if it modifies code). 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.

Conciseness4/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 unnecessary words. It is appropriately sized and front-loaded, though it could be slightly more structured (e.g., by including usage hints) to earn a perfect score.

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

Completeness2/5

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

Given the complexity of checking deprecated code (which involves analysis and potential output interpretation), the description is incomplete. No annotations exist to provide behavioral context, and there's no output schema to explain return values. The description alone lacks details on how results are presented, accuracy, or scope, making it inadequate for full understanding.

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

Parameters3/5

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

The input schema has 100% description coverage, clearly documenting both parameters ('code' and 'technology') with examples. The description adds no additional meaning beyond this, such as explaining parameter interactions or constraints. Since the schema does the heavy lifting, the baseline score of 3 is appropriate.

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 tool's purpose with a specific verb ('Check') and resource ('code or dependencies'), and identifies what it checks for ('deprecated features'). However, it doesn't explicitly differentiate from sibling tools like 'find_apis' or 'get_documentation', which might also relate to code analysis, so it doesn't reach the highest score.

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 provides no guidance on when to use this tool versus alternatives. It doesn't mention any specific contexts, prerequisites, or exclusions, nor does it reference sibling tools like 'search' or 'find_apis' for related tasks, leaving usage entirely implied.

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/rileyedwards77/perplexity-mcp-server'

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