Skip to main content
Glama
openags

Paper Search MCP

by openags

download_pubmed

Download PDF files of PubMed research papers by providing the PubMed ID (PMID) and specifying a save directory for academic access.

Instructions

Attempt to download PDF of a PubMed paper.

Args: paper_id: PubMed ID (PMID). save_path: Directory to save the PDF (default: './downloads'). Returns: str: Message indicating that direct PDF download is not supported.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paper_idYes
save_pathNo./downloads

Implementation Reference

  • The 'download_pubmed' tool handler in the MCP server, which wraps the platform-specific 'download_pdf' call.
    async def download_pubmed(paper_id: str, save_path: str = "./downloads") -> str:
        """Attempt to download PDF of a PubMed paper.
    
        Args:
            paper_id: PubMed ID (PMID).
            save_path: Directory to save the PDF (default: './downloads').
        Returns:
            str: Message indicating that direct PDF download is not supported.
        """
        try:
            return pubmed_searcher.download_pdf(paper_id, save_path)
        except NotImplementedError as e:
            return str(e)
  • The 'download_pdf' implementation in the PubMedSearcher class, which explicitly raises a NotImplementedError as PubMed does not support direct PDF downloads.
    def download_pdf(self, paper_id: str, save_path: str) -> str:
        """Attempt to download a paper's PDF from PubMed.
    
        Args:
            paper_id: PubMed ID (PMID)
            save_path: Directory to save the PDF
    
        Returns:
            str: Error message indicating PDF download is not supported
        
        Raises:
            NotImplementedError: Always raises this error as PubMed doesn't provide direct PDF access
        """
        message = ("PubMed does not provide direct PDF downloads. "
                  "Please use the paper's DOI or URL to access the publisher's website.")
        raise NotImplementedError(message)

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