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"],
      },
    },
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 retrieves documentation and examples but doesn't describe how it works (e.g., sources, format, limitations, rate limits, or error handling). For a tool with no annotations, this leaves significant gaps in understanding its behavior.

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, efficient sentence with zero waste. It's front-loaded with the core purpose and appropriately sized for the tool's complexity.

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

Completeness3/5

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

Given the tool's moderate complexity (2 parameters, no output schema, no annotations), the description is minimally adequate. It states the purpose but lacks details on behavior, usage context, and output format, which are needed for full understanding without annotations or output schema.

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?

Schema description coverage is 100%, so the schema already documents both parameters ('query' and 'context') with clear descriptions. The description adds no additional meaning beyond what the schema provides, such as examples or constraints, but doesn't need to compensate for low coverage.

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: 'Get documentation and usage examples for a specific technology, library, or API.' It specifies the verb ('Get') and resource ('documentation and usage examples'), but doesn't explicitly differentiate from sibling tools like 'find_apis' or 'search', which might have overlapping functionality.

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 sibling tools like 'find_apis' or 'search', nor does it specify prerequisites, exclusions, or contextual triggers for usage.

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