Skip to main content
Glama
openags

Paper Search MCP

by openags

download_iacr

Download PDF files of IACR ePrint papers using paper IDs to access cryptographic research documents for academic use.

Instructions

Download PDF of an IACR ePrint paper.

Args: paper_id: IACR paper ID (e.g., '2009/101'). save_path: Directory to save the PDF (default: './downloads'). Returns: Path to the downloaded PDF file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paper_idYes
save_pathNo./downloads

Implementation Reference

  • The actual download_pdf method of IACRSearcher class which performs the PDF file download from IACR ePrint Archive.
    def download_pdf(self, paper_id: str, save_path: str) -> str:
        """
        Download PDF from IACR ePrint Archive
    
        Args:
            paper_id: IACR paper ID (e.g., "2025/1014")
            save_path: Path to save the PDF
    
        Returns:
            str: Path to downloaded file or error message
        """
        try:
            pdf_url = f"{self.IACR_BASE_URL}/{paper_id}.pdf"
    
            response = self.session.get(pdf_url)
    
            if response.status_code == 200:
                filename = f"{save_path}/iacr_{paper_id.replace('/', '_')}.pdf"
                os.makedirs(save_path, exist_ok=True)
                with open(filename, "wb") as f:
                    f.write(response.content)
                return filename
            else:
                return f"Failed to download PDF: HTTP {response.status_code}"
    
        except Exception as e:
            logger.error(f"PDF download error: {e}")
            return f"Error downloading PDF: {e}"
  • The tool handler function download_iacr which calls the underlying iacr_searcher.download_pdf implementation.
    async def download_iacr(paper_id: str, save_path: str = "./downloads") -> str:
        """Download PDF of an IACR ePrint paper.
    
        Args:
            paper_id: IACR paper ID (e.g., '2009/101').
            save_path: Directory to save the PDF (default: './downloads').
        Returns:
            Path to the downloaded PDF file.
        """
        return iacr_searcher.download_pdf(paper_id, save_path)

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