download_base
Download PDF files of academic papers from BASE using paper identifiers. Specify a save directory to retrieve and store research documents.
Instructions
Download PDF for a paper from BASE.
Args: paper_id: BASE paper identifier. save_path: Directory to save the PDF (default: './downloads'). Returns: str: Path to downloaded PDF.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paper_id | Yes | ||
| save_path | No | ./downloads |
Implementation Reference
- paper_search_mcp/server.py:1172-1182 (handler)MCP tool registration and wrapper for `download_base`.
@mcp.tool() async def download_base(paper_id: str, save_path: str = "./downloads") -> str: """Download PDF for a paper from BASE. Args: paper_id: BASE paper identifier. save_path: Directory to save the PDF (default: './downloads'). Returns: str: Path to downloaded PDF. """ return base_searcher.download_pdf(paper_id, save_path) - Actual implementation of the PDF download logic for BASE in BASESearcher class.
def download_pdf(self, paper_id: str, save_path: str) -> str: """Download PDF for a BASE record. BASE often provides direct PDF links in metadata. Args: paper_id: BASE identifier or OAI-PMH identifier save_path: Directory to save PDF Returns: Path to saved PDF file Raises: NotImplementedError: If PDF cannot be downloaded """ # Try parent method first (searches for PDF URL)