/** * @fileoverview Defines the core logic, schemas, and types for the `perplexity_search` tool. * This tool interfaces with the Perplexity API to provide search-augmented answers. * @module src/mcp-server/tools/perplexitySearch/logic */ import { z } from 'zod'; import { RequestContext } from '../../../utils/index.js'; export declare const PerplexitySearchInputSchema: z.ZodObject<{ query: z.ZodString; return_related_questions: z.ZodDefault>; search_recency_filter: z.ZodOptional; search_domain_filter: z.ZodOptional>; search_after_date_filter: z.ZodOptional; search_before_date_filter: z.ZodOptional; search_mode: z.ZodOptional>; showThinking: z.ZodDefault>; }, "strip", z.ZodTypeAny, { return_related_questions: boolean; query: string; showThinking: boolean; search_domain_filter?: string[] | undefined; search_recency_filter?: string | undefined; search_after_date_filter?: string | undefined; search_before_date_filter?: string | undefined; search_mode?: "web" | "academic" | undefined; }, { query: string; search_domain_filter?: string[] | undefined; search_recency_filter?: string | undefined; search_after_date_filter?: string | undefined; search_before_date_filter?: string | undefined; return_related_questions?: boolean | undefined; search_mode?: "web" | "academic" | undefined; showThinking?: boolean | undefined; }>; declare const SearchResultSchema: z.ZodObject<{ title: z.ZodString; url: z.ZodString; date: z.ZodOptional>; }, "strip", z.ZodTypeAny, { url: string; title: string; date?: string | null | undefined; }, { url: string; title: string; date?: string | null | undefined; }>; export declare const PerplexitySearchResponseSchema: z.ZodObject<{ rawResultText: z.ZodString; responseId: z.ZodString; modelUsed: z.ZodString; usage: z.ZodObject<{ prompt_tokens: z.ZodNumber; completion_tokens: z.ZodNumber; total_tokens: z.ZodNumber; }, "strip", z.ZodTypeAny, { prompt_tokens: number; completion_tokens: number; total_tokens: number; }, { prompt_tokens: number; completion_tokens: number; total_tokens: number; }>; searchResults: z.ZodOptional>; }, "strip", z.ZodTypeAny, { url: string; title: string; date?: string | null | undefined; }, { url: string; title: string; date?: string | null | undefined; }>, "many">>; }, "strip", z.ZodTypeAny, { usage: { prompt_tokens: number; completion_tokens: number; total_tokens: number; }; responseId: string; rawResultText: string; modelUsed: string; searchResults?: { url: string; title: string; date?: string | null | undefined; }[] | undefined; }, { usage: { prompt_tokens: number; completion_tokens: number; total_tokens: number; }; responseId: string; rawResultText: string; modelUsed: string; searchResults?: { url: string; title: string; date?: string | null | undefined; }[] | undefined; }>; export type PerplexitySearchInput = z.infer; export type PerplexitySearchResponse = z.infer; export type SearchResult = z.infer; /** * 3. IMPLEMENT and export the core logic function. * It must remain pure: its only concerns are its inputs and its return value or thrown error. * @throws {McpError} If the logic encounters an unrecoverable issue. */ export declare function perplexitySearchLogic(params: PerplexitySearchInput, context: RequestContext): Promise; export {};