Skip to main content
Glama
flyanima

Open Search MCP

by flyanima

semantic_scholar_paper_details

Retrieve detailed academic paper information from Semantic Scholar using paper IDs or DOIs to support 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

  • The execute handler for the semantic_scholar_paper_details tool. Fetches detailed paper information using SemanticScholarAPIClient.getPaperDetails(paperId), formats the response including metadata, authors, limited references and citations, and handles errors.
    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 (Semantic Scholar paper ID or DOI).
    inputSchema: {
      type: 'object',
      properties: {
        paperId: {
          type: 'string',
          description: 'Semantic Scholar paper ID or DOI'
        }
      },
      required: ['paperId']
    },
  • Registration of the semantic_scholar_paper_details tool in the ToolRegistry, including name, description, category, and source.
    registry.registerTool({
      name: 'semantic_scholar_paper_details',
      description: 'Get detailed information about a specific paper from Semantic Scholar',
      category: 'academic',
      source: 'Semantic Scholar',
  • Helper method in SemanticScholarAPIClient class that performs the API request to retrieve detailed paper information, specifying required fields.
      async getPaperDetails(paperId: string) {
        const fields = 'paperId,title,abstract,authors,venue,year,citationCount,url,publicationDate,references,citations';
        return await this.makeRequest(`/paper/${paperId}`, { fields });
      }
    }
  • src/index.ts:232-232 (registration)
    Top-level registration call in OpenSearchMCPServer.registerAllTools() that invokes registerSemanticScholarTools, which registers semantic_scholar_paper_details among others.
    registerSemanticScholarTools(this.toolRegistry);    // 1 tool: search_semantic_scholar

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