Skip to main content
Glama

search_biorxiv

Search the bioRxiv preprint server for biology papers using queries, date ranges, and category filters to find relevant research.

Instructions

Search bioRxiv preprint server for biology papers

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYesSearch query string
maxResultsNoMaximum number of results to return
daysNoNumber of days to search back (default: 30)
categoryNoCategory filter (e.g., neuroscience, genomics)

Implementation Reference

  • Tool execution handler: dispatches to BioRxivSearcher.search(), formats results as JSON response.
    case 'search_biorxiv': { const { query, maxResults, days, category } = args; const results = await searchers.biorxiv.search(query, { maxResults, days, category }); return jsonTextResponse( `Found ${results.length} bioRxiv papers.\n\n${JSON.stringify( results.map((paper: Paper) => PaperFactory.toDict(paper)), null, 2 )}` ); }
  • Zod schema for validating search_biorxiv tool input parameters.
    export const SearchBioRxivSchema = z .object({ query: z.string().min(1), maxResults: z.number().int().min(1).max(100).optional().default(10), days: z.number().int().min(1).max(3650).optional(), category: z.string().optional() }) .strip();
  • MCP tool definition and registration with name, description, and JSON input schema.
    name: 'search_biorxiv', description: 'Search bioRxiv preprint server for biology papers', inputSchema: { type: 'object', properties: { query: { type: 'string', description: 'Search query string' }, maxResults: { type: 'number', minimum: 1, maximum: 100, description: 'Maximum number of results to return' }, days: { type: 'number', description: 'Number of days to search back (default: 30)' }, category: { type: 'string', description: 'Category filter (e.g., neuroscience, genomics)' } }, required: ['query'] }
  • Core search logic: constructs API request to bioRxiv based on date range and category, fetches and parses papers.
    async search(query: string, options: BioRxivSearchOptions = {}): Promise<Paper[]> { try { // 计算日期范围 const days = options.days || 30; const endDate = new Date().toISOString().split('T')[0]; const startDate = new Date(Date.now() - days * 24 * 60 * 60 * 1000).toISOString().split('T')[0]; // 构建搜索URL const searchUrl = `${this.baseUrl}/${startDate}/${endDate}`; const params: Record<string, any> = { cursor: 0 }; // 添加分类过滤 if (query && query !== '*') { // 将查询转换为分类格式 const category = query.toLowerCase().replace(/\s+/g, '_'); params.category = category; } logDebug(`${this.serverType} API Request: GET ${searchUrl}`); logDebug(`${this.serverType} Request params:`, params); const response = await axios.get(searchUrl, { params, timeout: TIMEOUTS.DEFAULT, headers: { 'User-Agent': USER_AGENT } }); logDebug(`${this.serverType} API Response: ${response.status} ${response.statusText}`); const papers = this.parseSearchResponse(response.data, query, options); logDebug(`${this.serverType} Parsed ${papers.length} papers`); return papers.slice(0, options.maxResults || 10); } catch (error: any) { logDebug(`${this.serverType} Search Error:`, error.message); this.handleHttpError(error, 'search'); } }
  • Instantiation of BioRxivSearcher instance assigned to searchers.biorxiv for use by tool handlers.
    const biorxivSearcher = new BioRxivSearcher('biorxiv'); const medrxivSearcher = new MedRxivSearcher();

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/Dianel555/paper-search-mcp-nodejs'

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