Skip to main content
Glama
openags

Paper Search MCP

by openags

read_semantic_paper

Extract text content from Semantic Scholar papers using various identifiers like DOI, arXiv, or PMID to access research material for analysis.

Instructions

Read and extract text content from a Semantic Scholar paper.

Args: paper_id: Semantic Scholar paper ID, Paper identifier in one of the following formats: - Semantic Scholar ID (e.g., "649def34f8be52c8b66281af98ae884c09aef38b") - DOI: (e.g., "DOI:10.18653/v1/N18-3011") - ARXIV: (e.g., "ARXIV:2106.15928") - MAG: (e.g., "MAG:112218234") - ACL: (e.g., "ACL:W12-3903") - PMID: (e.g., "PMID:19872477") - PMCID: (e.g., "PMCID:2323736") - URL: (e.g., "URL:https://arxiv.org/abs/2106.15928v1") save_path: Directory where the PDF is/will be saved (default: './downloads'). Returns: str: The extracted text content of the paper.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paper_idYes
save_pathNo./downloads

Implementation Reference

  • The MCP tool registration and implementation of `read_semantic_paper` which calls the `semantic_searcher.read_paper` helper method.
    @mcp.tool()
    async def read_semantic_paper(paper_id: str, save_path: str = "./downloads") -> str:
        """Read and extract text content from a Semantic Scholar paper. 
    
        Args:
            paper_id: Semantic Scholar paper ID, Paper identifier in one of the following formats:
                - Semantic Scholar ID (e.g., "649def34f8be52c8b66281af98ae884c09aef38b")
                - DOI:<doi> (e.g., "DOI:10.18653/v1/N18-3011")
                - ARXIV:<id> (e.g., "ARXIV:2106.15928")
                - MAG:<id> (e.g., "MAG:112218234")
                - ACL:<id> (e.g., "ACL:W12-3903")
                - PMID:<id> (e.g., "PMID:19872477")
                - PMCID:<id> (e.g., "PMCID:2323736")
                - URL:<url> (e.g., "URL:https://arxiv.org/abs/2106.15928v1")
            save_path: Directory where the PDF is/will be saved (default: './downloads').
        Returns:
            str: The extracted text content of the paper.
        """
        try:
            return semantic_searcher.read_paper(paper_id, save_path)
        except Exception as e:
            print(f"Error reading paper {paper_id}: {e}")
            return ""

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/openags/paper-search-mcp'

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