search_iacr
Search the IACR ePrint Archive for cryptography papers using keywords to find relevant academic research.
Instructions
Search IACR ePrint Archive for cryptography papers
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| query | Yes | Search query string | |
| maxResults | No | Maximum number of results to return | |
| fetchDetails | No | Fetch detailed information for each paper (slower) |
Implementation Reference
- src/mcp/handleToolCall.ts:210-221 (handler)MCP tool handler case for 'search_iacr' that parses arguments, calls the IACR searcher, and formats the response.case 'search_iacr': { const { query, maxResults, fetchDetails } = args; const results = await searchers.iacr.search(query, { maxResults, fetchDetails }); return jsonTextResponse( `Found ${results.length} IACR ePrint papers.\n\n${JSON.stringify( results.map((paper: Paper) => PaperFactory.toDict(paper)), null, 2 )}` ); }
- src/mcp/schemas.ts:101-107 (schema)Zod schema for validating input arguments to the search_iacr tool.export const SearchIACRSchema = z .object({ query: z.string().min(1), maxResults: z.number().int().min(1).max(50).optional().default(10), fetchDetails: z.boolean().optional() }) .strip();
- src/mcp/tools.ts:228-248 (registration)Tool registration object defining name, description, and input schema for MCP tool discovery.{ name: 'search_iacr', description: 'Search IACR ePrint Archive for cryptography papers', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query string' }, maxResults: { type: 'number', minimum: 1, maximum: 50, description: 'Maximum number of results to return' }, fetchDetails: { type: 'boolean', description: 'Fetch detailed information for each paper (slower)' } }, required: ['query'] } },
- src/platforms/IACRSearcher.ts:48-77 (handler)Core implementation of the search logic: performs HTTP request to IACR search endpoint, parses HTML response with cheerio, optionally fetches details.async search(query: string, options: IACRSearchOptions = {}): Promise<Paper[]> { try { const params = { q: query }; logDebug(`IACR API Request: GET ${this.searchUrl}`); logDebug('IACR Request params:', params); const response = await axios.get(this.searchUrl, { params, timeout: TIMEOUTS.DEFAULT, headers: { 'User-Agent': this.getRandomUserAgent(), 'Accept': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'Accept-Language': 'en-US,en;q=0.9' } }); logDebug(`IACR API Response: ${response.status} ${response.statusText}`); const papers = await this.parseSearchResponse(response.data, options); logDebug(`IACR Parsed ${papers.length} papers`); return papers.slice(0, options.maxResults || 10); } catch (error: any) { logDebug('IACR Search Error:', error.message); this.handleHttpError(error, 'search'); } }
- src/mcp/searchers.ts:37-81 (registration)Initializes and registers the IACRSearcher instance in the global searchers object used by tool handlers.export function initializeSearchers(): Searchers { if (searchers) return searchers; logDebug('Initializing searchers...'); const arxivSearcher = new ArxivSearcher(); const wosSearcher = new WebOfScienceSearcher(process.env.WOS_API_KEY, process.env.WOS_API_VERSION); const pubmedSearcher = new PubMedSearcher(process.env.PUBMED_API_KEY); const biorxivSearcher = new BioRxivSearcher('biorxiv'); const medrxivSearcher = new MedRxivSearcher(); const semanticSearcher = new SemanticScholarSearcher(process.env.SEMANTIC_SCHOLAR_API_KEY); const iacrSearcher = new IACRSearcher(); const googleScholarSearcher = new GoogleScholarSearcher(); const sciHubSearcher = new SciHubSearcher(); const scienceDirectSearcher = new ScienceDirectSearcher(process.env.ELSEVIER_API_KEY); const springerSearcher = new SpringerSearcher( process.env.SPRINGER_API_KEY, process.env.SPRINGER_OPENACCESS_API_KEY ); const wileySearcher = new WileySearcher(process.env.WILEY_TDM_TOKEN); const scopusSearcher = new ScopusSearcher(process.env.ELSEVIER_API_KEY); const crossrefSearcher = new CrossrefSearcher(process.env.CROSSREF_MAILTO); searchers = { arxiv: arxivSearcher, webofscience: wosSearcher, pubmed: pubmedSearcher, wos: wosSearcher, biorxiv: biorxivSearcher, medrxiv: medrxivSearcher, semantic: semanticSearcher, iacr: iacrSearcher, googlescholar: googleScholarSearcher, scholar: googleScholarSearcher, scihub: sciHubSearcher, sciencedirect: scienceDirectSearcher, springer: springerSearcher, wiley: wileySearcher, scopus: scopusSearcher, crossref: crossrefSearcher }; logDebug('Searchers initialized successfully'); return searchers; }