Skip to main content
Glama

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
NameRequiredDescriptionDefault
doiYesDOI (Digital Object Identifier)
platformNoPlatform to search

Implementation Reference

  • 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'] } },
  • 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();
  • 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)}`); }
  • 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; } }

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