Skip to main content
Glama
openags

Paper Search MCP

by openags

read_base_paper

Extract text content from academic papers using the BASE paper identifier. Downloads and processes PDFs to provide readable text for research analysis.

Instructions

Read and extract text content from a BASE paper.

Args: paper_id: BASE paper identifier. save_path: Directory where the PDF is/will be saved (default: './downloads'). Returns: str: Extracted text content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paper_idYes
save_pathNo./downloads

Implementation Reference

  • MCP tool handler for 'read_base_paper'. It calls the 'read_paper' method of the 'base_searcher' instance.
    @mcp.tool()
    async def read_base_paper(paper_id: str, save_path: str = "./downloads") -> str:
        """Read and extract text content from a BASE paper.
    
        Args:
            paper_id: BASE paper identifier.
            save_path: Directory where the PDF is/will be saved (default: './downloads').
        Returns:
            str: Extracted text content.
        """
        return base_searcher.read_paper(paper_id, save_path)
  • Implementation of 'read_paper' in BASESearcher, which wraps the base class 'read_paper' method to provide platform-specific error handling.
    def read_paper(self, paper_id: str, save_path: str = "./downloads") -> str:
        """Read paper text from PDF.
    
        Args:
            paper_id: Paper identifier
            save_path: Directory where PDF is/will be saved
    
        Returns:
            Extracted text content
    
        Raises:
            NotImplementedError: If PDF cannot be read
        """
        try:
            return super().read_paper(paper_id, save_path)
        except Exception as e:
            logger.error(f"Error reading BASE paper {paper_id}: {e}")
            raise NotImplementedError(
                f"Cannot read paper from BASE: {e}"
            )

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