Skip to main content
Glama
qpd-v

MCP Web Research Server

by qpd-v

parallel_search

Execute multiple Google searches simultaneously using the MCP Web Research Server, enabling efficient web research by processing up to 5 queries in parallel.

Instructions

Perform multiple Google searches in parallel

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
maxParallelNoMaximum number of parallel searches
queriesYesArray of search queries to execute in parallel

Implementation Reference

  • MCP CallToolRequestSchema handler case for 'parallel_search' tool. Validates input arguments, limits queries to 5, delegates execution to DeepResearch.parallelSearch.parallelSearch(), and returns the results as JSON text content.
    case 'parallel_search': {
        const args = request.params.arguments as unknown as ParallelSearchArgs;
        if (!args?.queries) {
            throw new McpError(ErrorCode.InvalidParams, 'Queries array is required');
        }
    
        const limitedQueries = args.queries.slice(0, 5);
        console.log(`Starting parallel search with ${limitedQueries.length} queries`);
        const result = await deepResearch.parallelSearch.parallelSearch(limitedQueries);
    
        return {
            content: [
                {
                    type: 'text',
                    text: JSON.stringify(result, null, 2)
                }
            ]
        };
    }
  • src/index.ts:126-147 (registration)
    Registration of the 'parallel_search' tool in the MCP ListToolsRequestSchema handler, including name, description, and input schema definition.
        name: 'parallel_search',
        description: 'Perform multiple Google searches in parallel',
        inputSchema: {
            type: 'object',
            properties: {
                queries: {
                    type: 'array',
                    items: {
                        type: 'string'
                    },
                    description: 'Array of search queries to execute in parallel'
                },
                maxParallel: {
                    type: 'number',
                    description: 'Maximum number of parallel searches',
                    minimum: 1,
                    maximum: 5
                }
            },
            required: ['queries']
        }
    },
  • Core implementation of parallel search logic in ParallelSearch class. Launches browser contexts, performs Google searches in parallel chunks using Playwright, extracts results with relevance scoring, handles errors, and provides execution summary.
    public async parallelSearch(queries: string[]): Promise<{
        results: ParallelSearchResult[];
        summary: {
            totalQueries: number;
            successful: number;
            failed: number;
            totalExecutionTime?: number;
            averageExecutionTime?: number;
        };
    }> {
        const startTime = this.options.includeTimings ? Date.now() : undefined;
        await this.initialize();
    
        const results: ParallelSearchResult[] = [];
        const chunks: string[][] = [];
    
        // Split queries into chunks of maxParallel size
        for (let i = 0; i < queries.length; i += this.options.maxParallel) {
            chunks.push(queries.slice(i, i + this.options.maxParallel));
        }
    
        // Process each chunk
        for (const chunk of chunks) {
            const chunkPromises = chunk.map((query, index) => {
                const searchId = `search_${Date.now()}_${index + 1}_of_${chunk.length}`;
                // Stagger the searches
                return new Promise<ParallelSearchResult>(async (resolve) => {
                    await new Promise(r => setTimeout(r, index * this.options.delayBetweenSearches));
                    const result = await this.singleSearch(
                        this.contexts[index % this.contexts.length],
                        query,
                        searchId
                    );
                    resolve(result);
                });
            });
    
            const chunkResults = await Promise.all(chunkPromises);
            results.push(...chunkResults);
    
            // Add a small delay between chunks
            if (chunks.indexOf(chunk) < chunks.length - 1) {
                await new Promise(r => setTimeout(r, 1000));
            }
        }
    
        const endTime = Date.now();
        const successful = results.filter(r => !r.error).length;
        const failed = results.filter(r => r.error).length;
    
        const summary = {
            totalQueries: queries.length,
            successful,
            failed,
            ...(this.options.includeTimings && startTime ? {
                totalExecutionTime: endTime - startTime,
                averageExecutionTime: Math.round((endTime - startTime) / queries.length)
            } : {})
        };
    
        // Add individual execution times to results if timing is enabled
        const timedResults = this.options.includeTimings ? results.map(r => ({
            ...r,
            executionTime: r.executionTime || 0
        })) : results;
    
        return {
            results: timedResults,
            summary
        };
    }
  • DeepResearch class property and instantiation of ParallelSearch instance used by the tool handler.
    public parallelSearch: ParallelSearch;
    private searchQueue: SearchQueue;
    private activeSessions: Map<string, ResearchSession>;
    
    constructor() {
        this.parallelSearch = new ParallelSearch();
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries the full burden of behavioral disclosure. It mentions 'parallel' execution but doesn't explain what that entails operationally (e.g., concurrency limits, error handling, or performance implications). It also omits critical details like authentication needs, rate limits, or whether this is a read-only operation.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise with a single, clear sentence that directly states the tool's function. There is no wasted language or unnecessary elaboration, making it easy to parse and understand at a glance.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness2/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the lack of annotations and output schema, the description is insufficient for a tool that performs parallel operations. It doesn't address key behavioral aspects like error handling, result format, or limitations of parallel execution, leaving significant gaps in understanding how to use the tool effectively.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has 100% description coverage, providing clear documentation for both parameters. The description adds minimal value beyond the schema by implying the tool handles multiple queries simultaneously, but doesn't elaborate on parameter interactions or usage nuances beyond what's already in the structured data.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('perform') and resource ('Google searches'), and specifies the parallel execution aspect. However, it doesn't explicitly differentiate from sibling tools like 'deep_research' or 'visit_page', which might have overlapping search functionality but different approaches.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'deep_research' or 'visit_page'. It doesn't specify scenarios where parallel searching is preferred over sequential or deeper research methods, leaving the agent to infer usage context.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Related 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/qpd-v/mcp-DEEPwebresearch'

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