Skip to main content
Glama
flyanima

Open Search MCP

by flyanima

semantic_scholar_paper_details

Retrieve comprehensive details about academic papers from Semantic Scholar using its paper ID or DOI, enabling efficient research and analysis.

Instructions

Get detailed information about a specific paper from Semantic Scholar

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paperIdYesSemantic Scholar paper ID or DOI

Implementation Reference

  • Handler function that executes the tool logic: fetches paper details from Semantic Scholar API using the client instance, processes references and citations, and returns formatted success/error response.
    execute: async (args: any) => { const { paperId } = args; try { const paper = await client.getPaperDetails(paperId); const paperDetails = { paperId: paper.paperId, title: paper.title, abstract: paper.abstract || 'No abstract available', authors: (paper.authors || []).map((author: any) => ({ name: author.name, authorId: author.authorId })), venue: paper.venue || 'Unknown venue', year: paper.year, citationCount: paper.citationCount || 0, url: paper.url || `https://www.semanticscholar.org/paper/${paper.paperId}`, publicationDate: paper.publicationDate, references: (paper.references || []).slice(0, 10).map((ref: any) => ({ title: ref.title, paperId: ref.paperId })), citations: (paper.citations || []).slice(0, 10).map((cite: any) => ({ title: cite.title, paperId: cite.paperId })), source: 'Semantic Scholar' }; return { success: true, data: { source: 'Semantic Scholar', paper: paperDetails, timestamp: Date.now() } }; } catch (error) { return { success: false, error: error instanceof Error ? error.message : 'Failed to get paper details from Semantic Scholar' }; } }
  • Input schema for the tool, requiring a 'paperId' string parameter (Semantic Scholar paper ID or DOI).
    inputSchema: { type: 'object', properties: { paperId: { type: 'string', description: 'Semantic Scholar paper ID or DOI' } }, required: ['paperId'] },
  • Specific registration of the 'semantic_scholar_paper_details' tool within the registerSemanticScholarTools function, including name, description, schema, and handler.
    registry.registerTool({ name: 'semantic_scholar_paper_details', description: 'Get detailed information about a specific paper from Semantic Scholar', category: 'academic', source: 'Semantic Scholar', inputSchema: { type: 'object', properties: { paperId: { type: 'string', description: 'Semantic Scholar paper ID or DOI' } }, required: ['paperId'] }, execute: async (args: any) => { const { paperId } = args; try { const paper = await client.getPaperDetails(paperId); const paperDetails = { paperId: paper.paperId, title: paper.title, abstract: paper.abstract || 'No abstract available', authors: (paper.authors || []).map((author: any) => ({ name: author.name, authorId: author.authorId })), venue: paper.venue || 'Unknown venue', year: paper.year, citationCount: paper.citationCount || 0, url: paper.url || `https://www.semanticscholar.org/paper/${paper.paperId}`, publicationDate: paper.publicationDate, references: (paper.references || []).slice(0, 10).map((ref: any) => ({ title: ref.title, paperId: ref.paperId })), citations: (paper.citations || []).slice(0, 10).map((cite: any) => ({ title: cite.title, paperId: cite.paperId })), source: 'Semantic Scholar' }; return { success: true, data: { source: 'Semantic Scholar', paper: paperDetails, timestamp: Date.now() } }; } catch (error) { return { success: false, error: error instanceof Error ? error.message : 'Failed to get paper details from Semantic Scholar' }; } } });
  • src/index.ts:231-232 (registration)
    Top-level registration call in OpenSearchMCPServer.registerAllTools() that invokes registerSemanticScholarTools, which registers this tool among others.
    registerIEEETools(this.toolRegistry); // 1 tool: search_ieee registerSemanticScholarTools(this.toolRegistry); // 1 tool: search_semantic_scholar
  • Core helper method in SemanticScholarAPIClient that performs the API request to retrieve paper details, used by the tool handler.
    async getPaperDetails(paperId: string) { const fields = 'paperId,title,abstract,authors,venue,year,citationCount,url,publicationDate,references,citations'; return await this.makeRequest(`/paper/${paperId}`, { fields }); }

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/flyanima/open-search-mcp'

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