get_paper_by_doi
Retrieve academic paper information using a DOI identifier from platforms like arXiv, Web of Science, or all available sources.
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/handleToolCall.ts:258-289 (handler)Main execution logic for the get_paper_by_doi tool: handles arguments, dispatches to platform searchers' getPaperByDoi method based on platform ('all' tries multiple), collects results, and returns formatted JSON response.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/mcp/tools.ts:298-313 (registration)Tool registration entry in the exported TOOLS array used for MCP tool advertisement, defining 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 for validating and parsing input arguments to the get_paper_by_doi tool.export const GetPaperByDoiSchema = z .object({ doi: z.string().min(1), platform: z.enum(['arxiv', 'webofscience', 'all']).optional().default('all') }) .strip();