Skip to main content
Glama
Decodo

Decodo MCP Server

perplexity

Read-only

Send a prompt to Perplexity to receive AI-powered answers and engage in conversation. Optionally set a country name to localize responses.

Instructions

Search and interact with Perplexity for AI-powered responses and conversations

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesPrompt to send to Perplexity
geoNoGeolocation of the desired request, expressed as a country name

Implementation Reference

  • PerplexityTool class that handles the tool logic. The register method calls server.registerTool with the name 'perplexity', defines input schema (prompt + geo), and the handler function builds params with target='perplexity', calls sapiClient.scrape(), and returns the response as text content.
    export class PerplexityTool extends Tool {
      toolset = TOOLSET.AI;
    
      transformResponse = ({ data }: { data: object }) => {
        return { data: JSON.stringify(data, null, 2) };
      };
    
      register = ({ server, sapiClient, auth }: ToolRegistrationArgs) => {
        server.registerTool(
          'perplexity',
          {
            description:
              'Search and interact with Perplexity for AI-powered responses and conversations',
            inputSchema: {
              prompt: z.string().describe('Prompt to send to Perplexity'),
              geo: zodGeo,
            },
            annotations: {
              readOnlyHint: true,
              openWorldHint: true,
            },
          },
          async (scrapingParams: ScrapingMCPParams, extra: ProgressExtra) => {
            const params = {
              ...scrapingParams,
              target: SCRAPER_API_TARGETS.PERPLEXITY,
              parse: true,
            } satisfies ScraperAPIParams;
    
            const { data } = await sapiClient.scrape<object>({ auth, scrapingParams: params, extra });
    
            const { data: text } = this.transformResponse({ data });
    
            return {
              content: [
                {
                  type: 'text',
                  text,
                },
              ],
            };
          }
        );
      };
    }
  • Input schema for the perplexity tool: 'prompt' (required string) and 'geo' (optional string from zodGeo). Also includes annotations: readOnlyHint and openWorldHint set to true.
    {
      description:
        'Search and interact with Perplexity for AI-powered responses and conversations',
      inputSchema: {
        prompt: z.string().describe('Prompt to send to Perplexity'),
        geo: zodGeo,
      },
      annotations: {
        readOnlyHint: true,
        openWorldHint: true,
      },
    },
  • PerplexityTool instantiated in the allTools array (line 96) which is used in registerTools/registerAllTools methods to register it with the MCP server.
    new PerplexityTool(),
  • Import of PerplexityTool class from '../tools' into the server registration file.
    PerplexityTool,
  • Constant definition: PERPLEXITY = 'perplexity' in the SCRAPER_API_TARGETS enum, used as the target parameter when calling the scraping API.
    PERPLEXITY = 'perplexity',
Behavior3/5

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

Annotations already indicate read-only and open-world behavior. The description adds 'AI-powered responses and conversations', which provides mild context but does not detail rate limits, authentication, or result format. With annotations bearing the main load, a score of 3 is appropriate.

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 well-front-loaded sentence that communicates the core function without extraneous words. Every part earns its place.

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?

The tool lacks an output schema, so the description should hint at return values (e.g., text, citations), but it does not. Combined with only two parameters, the description is incomplete for an agent to fully understand the tool's behavior.

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 coverage is 100%, so baseline is 3. The description does not enhance parameter meaning beyond what the schema already provides (e.g., no guidance on prompt style or geo usage). Thus no additional value is added.

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 is for searching and interacting with Perplexity for AI responses, distinguishing it from siblings that target specific platforms like Amazon or Google. However, it could be more specific about the nature of the interaction (e.g., query-based responses vs. conversation).

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 over alternatives such as google_search or chatgpt. The description lacks explicit context for selection, which is crucial given the many similar sibling tools.

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

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

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