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"],
          },
        },
      ],
    }));

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv1.0.0

TDQS

C2.9/5.0
Behavior2/5

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

The description does not disclose behavioral traits beyond its basic function. It does not state if the check is read-only, whether it executes the code, what input format is expected, or what output is produced. With no annotations, this lack of detail is a significant gap.

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, focused sentence with no redundant information. It gets straight to the point.

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?

Despite the small parameter count, the description lacks crucial information about the tool's behavior and return value. Without an output schema or annotations, the agent is left without a clear picture of what to expect. The description is too minimal to be complete.

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 schema fully describes both parameters (code and technology), so the description doesn't need to elaborate. The description adds no additional parameter context beyond the schema, aligning with the baseline score of 3.

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 function: checking code or dependencies for deprecated features. It distinguishes from sibling tools like search and get_documentation by focusing on deprecation analysis rather than general information retrieval.

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?

No guidance is provided on when to use this tool versus alternatives like search or get_documentation. The description only states what it does, implying usage but offering no exclusions or comparison.

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