get_paper_by_doi
Retrieve academic paper information by entering its DOI identifier to access details from platforms like arXiv, Web of Science, and others.
Instructions
Retrieve paper information using DOI from available platforms
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| doi | Yes | DOI (Digital Object Identifier) | |
| platform | No | Platform to search |
Implementation Reference
- src/mcp/tools.ts:298-313 (registration)Registration of the MCP tool 'get_paper_by_doi' including name, description, and JSON input schema.{ name: 'get_paper_by_doi', description: 'Retrieve paper information using DOI from available platforms', inputSchema: { type: 'object', properties: { doi: { type: 'string', description: 'DOI (Digital Object Identifier)' }, platform: { type: 'string', enum: ['arxiv', 'webofscience', 'all'], description: 'Platform to search' } }, required: ['doi'] } },
- src/mcp/schemas.ts:127-132 (schema)Zod schema definition (GetPaperByDoiSchema) for input validation of the 'get_paper_by_doi' tool arguments, used in parseToolArgs.export const GetPaperByDoiSchema = z .object({ doi: z.string().min(1), platform: z.enum(['arxiv', 'webofscience', 'all']).optional().default('all') }) .strip();
- src/mcp/handleToolCall.ts:258-289 (handler)Primary handler logic for executing the 'get_paper_by_doi' tool: parses arguments, selects platform searcher(s), calls getPaperByDoi, formats and returns results.case 'get_paper_by_doi': { const { doi, platform } = args; const results: Record<string, any>[] = []; if (platform === 'all') { for (const [platformName, searcher] of Object.entries(searchers)) { if (platformName === 'wos' || platformName === 'scholar') continue; try { const paper = await (searcher as PaperSource).getPaperByDoi(doi); if (paper) { results.push(PaperFactory.toDict(paper)); } } catch (error) { logDebug(`Error getting paper by DOI from ${platformName}:`, error); } } } else { const searcher = (searchers as any)[platform]; if (!searcher) { throw new Error(`Unsupported platform: ${platform}`); } const paper = await searcher.getPaperByDoi(doi); if (paper) { results.push(PaperFactory.toDict(paper)); } } if (results.length === 0) { return jsonTextResponse(`No paper found with DOI: ${doi}`); } return jsonTextResponse(`Found ${results.length} paper(s) with DOI ${doi}:\n\n${JSON.stringify(results, null, 2)}`); }
- src/platforms/PaperSource.ts:118-126 (helper)Base class method providing default getPaperByDoi implementation for PaperSource subclasses by searching the DOI as a query.async getPaperByDoi(doi: string): Promise<Paper | null> { try { const results = await this.search(doi, { maxResults: 1 }); return results.length > 0 ? results[0] : null; } catch (error) { logDebug(`Error getting paper by DOI from ${this.platformName}:`, error); return null; } }