UNPKG

perplexity-mcp-server

Version:

A Perplexity API Model Context Protocol (MCP) server that unlocks Perplexity's search-augmented AI capabilities for LLM agents. Features robust error handling, secure input validation, and transparent reasoning with the showThinking parameter. Built with

31 lines (30 loc) 1.38 kB
import { z } from 'zod'; import { RequestContext } from '../../../utils/requestContext.js'; import { CallToolResult } from '@modelcontextprotocol/sdk/types'; export declare const PerplexitySearchInputSchema: z.ZodObject<{ query: z.ZodString; return_related_questions: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; search_recency_filter: z.ZodOptional<z.ZodString>; search_domain_filter: z.ZodOptional<z.ZodArray<z.ZodString, "many">>; showThinking: z.ZodDefault<z.ZodOptional<z.ZodBoolean>>; }, "strip", z.ZodTypeAny, { return_related_questions: boolean; query: string; showThinking: boolean; search_domain_filter?: string[] | undefined; search_recency_filter?: string | undefined; }, { query: string; search_domain_filter?: string[] | undefined; return_related_questions?: boolean | undefined; search_recency_filter?: string | undefined; showThinking?: boolean | undefined; }>; export type PerplexitySearchInput = z.infer<typeof PerplexitySearchInputSchema>; /** * Executes the Perplexity search logic. * @param input - Validated input data. * @param parentContext - The context from the calling handler. * @returns A promise resolving to the SDK's CallToolResult structure. */ export declare function executePerplexitySearch(input: PerplexitySearchInput, parentContext: RequestContext): Promise<CallToolResult>;