initiate_deep_research
Launch a comprehensive research task combining multiple search queries with email enrichment options to retrieve filtered results, including school-specific data and contact details.
Instructions
Initiate a deep research job that combines multiple search variations with optional email enrichment. Each result costs 1 credit.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| acceptance_threshold | No | Acceptance score threshold (0-100) for a match (default: 60) | |
| enrich_emails | No | Whether to enrich results with contact information (default: true) | |
| limit | No | Maximum number of results to return (default: 30, max: 100) | |
| query | Yes | The search query to research | |
| school | No | Filter results by school names |
Implementation Reference
- The main handler function that executes the tool logic: destructures params, constructs API request to deep research endpoint, handles response, and returns formatted content.export const initiateDeepResearchTool = async ({ query, limit = 30, school, enrich_emails = true, acceptance_threshold = 60, }: InitiateDeepResearchParams) => { const apiUrl = new URL("https://search.linkd.inc/api/search/deep_research"); const body = { query, limit: Math.min(limit, 100), school, enrich_emails, acceptance_threshold: Math.max(0, Math.min(100, acceptance_threshold)), }; const response = await makeLinkdRequest(apiUrl.toString(), { method: "POST", headers: { "Content-Type": "application/json", }, body: JSON.stringify(body), }); const responseData = await response.json(); if (responseData.error) { throw new Error( `Failed to initiate deep research: ${JSON.stringify(responseData.error)}` ); } return { content: [ { type: "text" as const, text: `deep research job initiated: ${JSON.stringify(responseData, null, 2)}` } ] }; };
- Input schema using Zod for parameter validation and descriptions.export const initiateDeepResearchSchema = { query: z.string().describe("The search query to research"), limit: z.number().max(100).default(30).describe("Maximum number of results to return (default: 30, max: 100)"), school: z.array(z.string()).optional().describe("Filter results by school names"), enrich_emails: z.boolean().default(true).describe("Whether to enrich results with contact information (default: true)"), acceptance_threshold: z.number().min(0).max(100).default(60).describe("Acceptance score threshold (0-100) for a match (default: 60)"), };
- src/server_setup.ts:47-52 (registration)Registers the initiate_deep_research tool with the MCP server by calling server.tool with name, description, schema, and handler.server.tool( initiateDeepResearchName, initiateDeepResearchDescription, initiateDeepResearchSchema, initiateDeepResearchTool );