download_crossref
Download academic papers using CrossRef DOIs by accessing publisher websites, as CrossRef is a citation database without direct PDF downloads.
Instructions
Attempt to download PDF of a CrossRef paper.
Args: paper_id: CrossRef DOI (e.g., '10.1038/nature12373'). save_path: Directory to save the PDF (default: './downloads'). Returns: str: Message indicating that direct PDF download is not supported.
Note: CrossRef is a citation database and doesn't provide direct PDF downloads. Use the DOI to access the paper through the publisher's website.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paper_id | Yes | ||
| save_path | No | ./downloads |
Implementation Reference
- paper_search_mcp/server.py:711-725 (handler)The handler function `download_crossref` which acts as the entry point for the tool. It calls the `download_pdf` method of the `crossref_searcher` instance.
async def download_crossref(paper_id: str, save_path: str = "./downloads") -> str: """Attempt to download PDF of a CrossRef paper. Args: paper_id: CrossRef DOI (e.g., '10.1038/nature12373'). save_path: Directory to save the PDF (default: './downloads'). Returns: str: Message indicating that direct PDF download is not supported. Note: CrossRef is a citation database and doesn't provide direct PDF downloads. Use the DOI to access the paper through the publisher's website. """ try: return crossref_searcher.download_pdf(paper_id, save_path) - The actual implementation of `download_pdf` inside the `CrossRefSearcher` class. It returns a message explaining that CrossRef does not provide direct PDF downloads.
def download_pdf(self, paper_id: str, save_path: str) -> str: """ CrossRef doesn't provide direct PDF downloads. Args: paper_id: DOI of the paper save_path: Directory to save the PDF Raises: NotImplementedError: Always raises this error as CrossRef doesn't provide direct PDF access """ message = ("CrossRef does not provide direct PDF downloads. " "CrossRef is a citation database that provides metadata about academic papers. " "To access the full text, please use the paper's DOI or URL to visit the publisher's website.") raise NotImplementedError(message)