Skip to main content
Glama
h-lu
by h-lu

download_crossref

Explains why PDFs cannot be downloaded from CrossRef and provides alternative methods to obtain academic papers through other sources.

Instructions

CrossRef does NOT support direct PDF downloads.

CrossRef is a metadata/citation database only - it does not host PDFs. INSTEAD (try in order): 1. download_arxiv(id) - if arXiv preprint (always works) 2. download_scihub(doi) - if published before 2023 3. download_semantic(id) - last resort (may not have PDF) Args: paper_id: DOI (e.g., '10.1038/nature12373'). save_path: Unused. Returns: Error message explaining alternatives.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paper_idYes
save_pathNo

Implementation Reference

  • Primary handler and registration for the 'download_crossref' MCP tool. Delegates to the generic _download function using the 'crossref' searcher.
    @mcp.tool() async def download_crossref(paper_id: str, save_path: Optional[str] = None) -> str: """CrossRef does NOT support direct PDF downloads. CrossRef is a metadata/citation database only - it does not host PDFs. INSTEAD (try in order): 1. download_arxiv(id) - if arXiv preprint (always works) 2. download_scihub(doi) - if published before 2023 3. download_semantic(id) - last resort (may not have PDF) Args: paper_id: DOI (e.g., '10.1038/nature12373'). save_path: Unused. Returns: Error message explaining alternatives. """ return await _download('crossref', paper_id, save_path)
  • Generic _download helper function used by all platform-specific download tools, including download_crossref. Calls searcher.download_pdf() and handles NotImplementedError.
    async def _download( searcher_name: str, paper_id: str, save_path: Optional[str] = None ) -> str: """通用下载函数""" if save_path is None: save_path = get_download_path() searcher = SEARCHERS.get(searcher_name) if not searcher: return f"Error: Unknown searcher {searcher_name}" try: return searcher.download_pdf(paper_id, save_path) except NotImplementedError as e: return str(e) except Exception as e: logger.error(f"Download failed for {searcher_name}: {e}") return f"Error downloading: {str(e)}"
  • CrossRefSearcher.download_pdf method implementation. Raises NotImplementedError with detailed user guidance, as CrossRef is metadata-only.
    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)
  • Global SEARCHERS dictionary instantiating CrossRefSearcher() for use by download_crossref and other tools.
    SEARCHERS = { 'arxiv': ArxivSearcher(), 'pubmed': PubMedSearcher(), 'biorxiv': BioRxivSearcher(), 'medrxiv': MedRxivSearcher(), 'google_scholar': GoogleScholarSearcher(), 'iacr': IACRSearcher(), 'semantic': SemanticSearcher(), 'crossref': CrossRefSearcher(), 'repec': RePECSearcher(), }

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/h-lu/paper-search-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server