Skip to main content
Glama
jina-ai

Jina AI Remote MCP Server

Official
by jina-ai

parallel_search_ssrn

Execute multiple SSRN academic searches simultaneously to gather comprehensive social science research from diverse angles and methodologies.

Instructions

Run multiple SSRN searches in parallel for comprehensive social science research coverage and diverse academic angles. For best results, provide multiple search queries that explore different research angles and methodologies. You can use expand_query to help generate diverse queries, or create them yourself.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
searchesYesArray of SSRN search configurations to execute in parallel (maximum 5 searches for optimal performance)
timeoutNoTimeout in milliseconds for all searches

Implementation Reference

  • Primary handler implementation for the 'parallel_search_ssrn' tool. Registers the tool with MCP server, defines input schema, and implements parallel execution logic using executeSsrnSearch and executeParallelSearches.
    if (isToolEnabled("parallel_search_ssrn")) {
    	server.tool(
    		"parallel_search_ssrn",
    		"Run multiple SSRN searches in parallel for comprehensive social science research coverage and diverse academic angles. For best results, provide multiple search queries that explore different research angles and methodologies. You can use expand_query to help generate diverse queries, or create them yourself.",
    		{
    			searches: z.array(z.object({
    				query: z.string().describe("Academic search terms, author names, or research topics"),
    				num: z.number().default(30).describe("Maximum number of academic papers to return, between 1-100"),
    				tbs: z.string().optional().describe("Time-based search parameter, e.g., 'qdr:h' for past hour")
    			})).max(5).describe("Array of SSRN search configurations to execute in parallel (maximum 5 searches for optimal performance)"),
    			timeout: z.number().default(30000).describe("Timeout in milliseconds for all searches")
    		},
    		async ({ searches, timeout }: { searches: SearchSsrnArgs[]; timeout: number }) => {
    			try {
    				const props = getProps();
    
    				const tokenError = checkBearerToken(props.bearerToken);
    				if (tokenError) {
    					return tokenError;
    				}
    
    				const uniqueSearches = searches.filter((search, index, self) =>
    					index === self.findIndex(s => s.query === search.query)
    				);
    
    				// Use the common SSRN search function
    				const ssrnSearchFunction = async (searchArgs: SearchSsrnArgs) => {
    					return executeSsrnSearch(searchArgs, props.bearerToken);
    				};
    
    				// Execute parallel searches using utility
    				const results = await executeParallelSearches(uniqueSearches, ssrnSearchFunction, { timeout });
    
    				return {
    					content: formatParallelSearchResultsToContentItems(results),
    				};
    			} catch (error) {
    				return createErrorResponse(`Error: ${error instanceof Error ? error.message : String(error)}`);
    			}
    		},
    	);
  • Type definition for SearchSsrnArgs used in the tool's input schema.
    export interface SearchSsrnArgs {
        query: string;
        num?: number;
        tbs?: string;
    }
  • Core helper function executeSsrnSearch that performs a single SSRN search via Jina API, called by the parallel handler.
    export async function executeSsrnSearch(
        searchArgs: SearchSsrnArgs,
        bearerToken: string
    ): Promise<SearchResultOrError> {
        try {
            const response = await fetch('https://svip.jina.ai/', {
                method: 'POST',
                headers: {
                    'Accept': 'application/json',
                    'Content-Type': 'application/json',
                    'Authorization': `Bearer ${bearerToken}`,
                },
                body: JSON.stringify({
                    q: searchArgs.query,
                    domain: 'ssrn',
                    num: searchArgs.num || 30,
                    ...(searchArgs.tbs && { tbs: searchArgs.tbs })
                }),
            });
    
            if (!response.ok) {
                return { error: `SSRN search failed for query "${searchArgs.query}": ${response.statusText}` };
            }
    
            const data = await response.json() as any;
            return { query: searchArgs.query, results: data.results || [] };
        } catch (error) {
            return { error: `SSRN search failed for query "${searchArgs.query}": ${error instanceof Error ? error.message : String(error)}` };
        }
    }
  • Generic helper executeParallelSearches for running multiple searches concurrently with timeout handling.
    export async function executeParallelSearches<T>(
        searches: T[],
        searchFunction: (searchArgs: T) => Promise<SearchResultOrError>,
        options: ParallelSearchOptions = {}
    ): Promise<ParallelSearchResult[]> {
        const { timeout = 30000 } = options;
    
        // Execute all searches in parallel
        const searchPromises = searches.map(async (searchArgs) => {
            try {
                return await searchFunction(searchArgs);
            } catch (error) {
                return { error: `Search failed: ${error instanceof Error ? error.message : String(error)}` };
            }
        });
    
        // Wait for all searches with timeout
        const results = await Promise.allSettled(searchPromises);
        const timeoutPromise = new Promise(resolve => setTimeout(() => resolve('timeout'), timeout));
    
        const completedResults = await Promise.race([
            Promise.all(results.map(result =>
                result.status === 'fulfilled' ? result.value : { error: 'Promise rejected' }
            )),
            timeoutPromise
        ]);
    
        if (completedResults === 'timeout') {
            throw new Error(`Parallel search timed out after ${timeout}ms`);
        }
    
        return completedResults as ParallelSearchResult[];
    }
  • src/index.ts:13-23 (registration)
    Tool listed in parallel tag and ALL_TOOLS for enabling/disabling via query params.
    	parallel: ["parallel_search_web", "parallel_search_arxiv", "parallel_search_ssrn", "parallel_read_url"],
    	read: ["read_url", "parallel_read_url", "capture_screenshot_url"],
    	utility: ["primer", "show_api_key", "expand_query", "guess_datetime_url", "extract_pdf"],
    	rerank: ["sort_by_relevance", "deduplicate_strings", "deduplicate_images"],
    };
    
    // All available tools
    const ALL_TOOLS = [
    	"primer", "show_api_key", "read_url", "capture_screenshot_url", "guess_datetime_url",
    	"search_web", "search_arxiv", "search_ssrn", "search_images", "search_jina_blog", "expand_query",
    	"parallel_search_web", "parallel_search_arxiv", "parallel_search_ssrn", "parallel_read_url",
  • src/index.ts:100-100 (registration)
    Main entry point calls registerJinaTools which conditionally registers parallel_search_ssrn based on enabledTools.
    registerJinaTools(server, () => currentProps, enabledTools);
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: it's a search operation (implied read-only), mentions 'optimal performance' with maximum 5 searches (implied rate/performance consideration), and suggests 'best results' with diverse queries. It doesn't explicitly mention authentication needs or rate limits, but provides practical usage context.

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 appropriately sized with three sentences, each earning its place: first states purpose, second provides usage guidance, third mentions alternative approaches. It's front-loaded with the core functionality and wastes no words on redundant information.

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

Completeness4/5

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

Given no annotations and no output schema, the description does well by covering purpose, usage guidelines, and behavioral context. It could be more complete by explicitly mentioning the read-only nature or expected return format, but for a search tool with good schema coverage, it provides sufficient context for effective use.

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?

Schema description coverage is 100%, so the baseline is 3. The description adds some value by explaining the purpose of providing 'multiple search queries' and mentioning 'diverse academic angles,' which gives context for the 'searches' array parameter, but doesn't add significant semantic detail beyond what the schema already documents about individual search parameters.

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

Purpose5/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 specific verbs ('run multiple SSRN searches in parallel') and resource ('SSRN searches'), distinguishing it from siblings like 'search_ssrn' by emphasizing parallel execution for comprehensive coverage and diverse academic angles. It explicitly mentions social science research context.

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

Usage Guidelines5/5

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

The description provides explicit guidance on when to use this tool ('for comprehensive social science research coverage and diverse academic angles'), how to use it ('provide multiple search queries'), and mentions an alternative tool ('expand_query') for generating diverse queries. It also suggests creating queries manually as another option.

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

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/jina-ai/MCP'

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