Skip to main content
Glama
rileyedwards77

Perplexity AI MCP Server

get_documentation

Retrieve documentation and usage examples for technologies, libraries, or APIs to understand implementation details and best practices.

Instructions

Get documentation and usage examples for a specific technology, library, or API

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe technology, library, or API to get documentation for
contextNoAdditional context or specific aspects to focus on

Implementation Reference

  • The handler for the 'get_documentation' tool. It extracts query and optional context from arguments, sends a POST request to Perplexity's /search endpoint with a prefixed query, and returns the JSON response as text content.
    case "get_documentation": {
      const { query, context = "" } =
        request.params.arguments as {
          query: string;
          context?: string;
        };
      const response = await this.axiosInstance.post('/search', {
        query: `documentation ${query} ${context}`
      });
      return {
        content: [
          {
            type: "text",
            text: JSON.stringify(response.data, null, 2),
          },
        ],
      };
    }
  • Input schema definition for the 'get_documentation' tool, specifying query (required) and optional context parameters.
    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"],
    },
  • index.ts:143-163 (registration)
    Registration of the 'get_documentation' tool in the ListTools response, including name, description, and input schema.
    {
      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"],
      },
    },

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