Skip to main content
Glama
quequiere

perplexity-web-mcp

by quequiere

search_advanced

Search Perplexity.ai with specific source selection to combine web, academic, and social sources for queries where source control matters.

Instructions

Search Perplexity.ai with specific source selection. Lets you combine multiple sources (e.g. web + academic). Use this when source control matters; prefer search for general queries.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesThe search query
sourcesYesSources to search: 'web' (general web), 'academic' (scholarly articles), 'social' (Reddit & forums). Can combine multiple.

Implementation Reference

  • Tool execution handler for search_advanced, which invokes searchWithSources.
    execute: async ({ query, sources }) => {
      await ensureBrowser();
      const result = await searchWithSources(query, TIMEOUT_MS, sources);
      return formatResult(result);
    },
  • Handler implementation for searching with specific sources, which calls runSearch.
    export async function searchWithSources(query: string, timeoutMs: number, sources: string[]): Promise<SearchResult> {
      log(`Search: "${query}" sources=[${sources.join(",")}] (timeout: ${timeoutMs}ms)`);
      return runSearch(query, timeoutMs, sources);
    }
  • src/index.ts:42-58 (registration)
    Registration of the search_advanced MCP tool.
    mcp.addTool({
      name: "search_advanced",
      description:
        "Search Perplexity.ai with specific source selection. Lets you combine multiple sources (e.g. web + academic). Use this when source control matters; prefer `search` for general queries.",
      parameters: z.object({
        query: z.string().describe("The search query"),
        sources: z
          .array(z.enum(["web", "academic", "social"]))
          .min(1)
          .describe("Sources to search: 'web' (general web), 'academic' (scholarly articles), 'social' (Reddit & forums). Can combine multiple."),
      }),
      execute: async ({ query, sources }) => {
        await ensureBrowser();
        const result = await searchWithSources(query, TIMEOUT_MS, sources);
        return formatResult(result);
      },
    });
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/quequiere/perplexity-web-mcp'

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