download_openaire
Download PDFs for academic papers from OpenAIRE using paper identifiers. Save files to specified directories for research access.
Instructions
Download PDF for a paper from OpenAIRE.
Args: paper_id: OpenAIRE paper identifier. save_path: Directory to save the PDF (default: './downloads'). Returns: str: Path to downloaded PDF or error message.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paper_id | Yes | ||
| save_path | No | ./downloads |
Implementation Reference
- paper_search_mcp/server.py:1095-1104 (handler)The download_openaire tool handler in the MCP server, which delegates the download task to the OpenAiresearcher instance.
async def download_openaire(paper_id: str, save_path: str = "./downloads") -> str: """Download PDF for a paper from OpenAIRE. Args: paper_id: OpenAIRE paper identifier. save_path: Directory to save the PDF (default: './downloads'). Returns: str: Path to downloaded PDF or error message. """ return openaire_searcher.download_pdf(paper_id, save_path) - The download_pdf method implementation in the OpenAiresearcher class, which currently raises a NotImplementedError, indicating that this specific tool's functionality is not yet implemented.
def download_pdf(self, paper_id: str, save_path: str) -> str: """ Download PDF for an OpenAIRE paper. Note: OpenAIRE provides links to open access versions when available. Args: paper_id: OpenAIRE paper identifier save_path: Directory to save the PDF Returns: Path to the saved PDF file Raises: Exception: If download fails or no PDF available """ # Implementation would need to: # 1. Fetch paper details to get PDF URL # 2. Download the PDF if available # 3. Save to specified path raise NotImplementedError( f"{self.__class__.__name__} PDF download not implemented yet. " "Use the pdf_url field from search results for direct access." )