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
| Name | Required | Description | Default |
|---|---|---|---|
| paper_id | Yes | ||
| save_path | No | ./downloads |
Implementation Reference
- paper_search_mcp/server.py:1159-1170 (handler)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}" )