/** * SearXNG search tool implementation * Handles the search tool execution and result formatting */ import { Config } from '../config/index.js'; /** * Simplified search result for MCP response */ export interface SearchResult { /** Search result title */ title: string; /** Search result URL */ link: string; /** Search result snippet/summary */ snippet: string; } /** * Search response for a single query */ export interface SearchResponse { /** Search query */ query: string; /** Search results list */ results: SearchResult[]; /** Number of results found */ total_results: number; /** Whether the search was successful */ success: boolean; /** Error message if search failed */ error?: string; } /** * Multi-search response for MCP */ export interface MultiSearchResponse { /** Multiple search results */ searches: SearchResponse[]; /** Summary statistics */ summary: { total_queries: number; successful_queries: number; failed_queries: number; }; } /** * SearXNG search tool handler */ export declare class SearXNGSearchTool { private apiClient; constructor(config: Config); /** * Execute search with multiple queries */ executeSearch(queries: string[], engines?: string[], categories?: string[], safesearch?: number, language?: string): Promise; /** * Format API response for MCP client */ private formatResponse; /** * Test connection to SearXNG instance */ testConnection(): Promise; }