search
Search the web to get AI-synthesized answers with cited sources for your queries. Provides comprehensive information from multiple sources in one response.
Instructions
Search the web using Perplexity.ai and get an AI-synthesized answer with cited sources. Uses default Perplexity settings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | The search query |
Implementation Reference
- src/index.ts:28-40 (registration)Tool registration for "search" in src/index.ts using FastMCP.
mcp.addTool({ name: "search", description: "Search the web using Perplexity.ai and get an AI-synthesized answer with cited sources. Uses default Perplexity settings.", parameters: z.object({ query: z.string().describe("The search query"), }), execute: async ({ query }) => { await ensureBrowser(); const result = await search(query, TIMEOUT_MS); return formatResult(result); }, }); - src/search.ts:26-29 (handler)The handler function for the "search" tool logic.
export async function search(query: string, timeoutMs: number): Promise<SearchResult> { log(`Search: "${query}" (timeout: ${timeoutMs}ms)`); return runSearch(query, timeoutMs, null); }