Skip to main content
Glama
openags

Paper Search MCP

by openags

download_biorxiv

Download PDF files of bioRxiv papers using their DOI identifiers. Specify a paper ID and optional save directory to retrieve research papers for offline access.

Instructions

Download PDF of a bioRxiv paper.

Args: paper_id: bioRxiv DOI. 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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of the download_pdf method within the BioRxivSearcher class, which handles the actual downloading of the PDF file from bioRxiv.
    def download_pdf(self, paper_id: str, save_path: str) -> str:
        """
        Download a PDF for a given paper ID from bioRxiv.
    
        Args:
            paper_id: The DOI of the paper.
            save_path: Directory to save the PDF.
    
        Returns:
            Path to the downloaded PDF file.
        """
        if not paper_id:
            raise ValueError("Invalid paper_id: paper_id is empty")
    
        pdf_url = f"https://www.biorxiv.org/content/{paper_id}v1.full.pdf"
        tries = 0
        while tries < self.max_retries:
            try:
                # Add User-Agent to avoid potential 403 errors
                headers = {
                    'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.124 Safari/537.36'
                }
                response = self.session.get(pdf_url, timeout=self.timeout, headers=headers)
                response.raise_for_status()
                os.makedirs(save_path, exist_ok=True)
                output_file = f"{save_path}/{paper_id.replace('/', '_')}.pdf"
                with open(output_file, 'wb') as f:
                    f.write(response.content)
                return output_file
            except requests.exceptions.RequestException as e:
                tries += 1
                if tries == self.max_retries:
                    raise Exception(f"Failed to download PDF after {self.max_retries} attempts: {e}")
                print(f"Attempt {tries} failed, retrying...")
  • The MCP tool handler for 'download_biorxiv' in server.py, which calls the download_pdf method of the BioRxivSearcher class.
    async def download_biorxiv(paper_id: str, save_path: str = "./downloads") -> str:
        """Download PDF of a bioRxiv paper.
    
        Args:
            paper_id: bioRxiv DOI.
            save_path: Directory to save the PDF (default: './downloads').
        Returns:
            Path to the downloaded PDF file.
        """
        return biorxiv_searcher.download_pdf(paper_id, save_path)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

With no annotations provided, the description carries full burden. It states the tool downloads a PDF and returns a file path, but doesn't disclose important behavioral traits like network dependencies, error handling (what happens if paper_id is invalid), authentication requirements, rate limits, or whether it creates directories if save_path doesn't exist.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is perfectly structured and front-loaded: first sentence states the core purpose, followed by clearly labeled sections for Args and Returns. Every sentence earns its place with zero waste or redundancy.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool has an output schema (which covers return values) and relatively simple parameters, the description is adequate but incomplete. It covers the basic operation but lacks important context about behavioral traits (network operations, error conditions) that would be needed for robust agent usage, especially with no annotations.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It provides meaningful context for both parameters: 'paper_id' is explained as a 'bioRxiv DOI' (not just any string), and 'save_path' gets a default value explanation and purpose clarification. This adds significant value beyond the bare schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the specific action ('Download PDF'), target resource ('bioRxiv paper'), and distinguishes it from siblings by specifying the source (bioRxiv vs. arXiv, medRxiv, etc.). It's a precise verb+resource combination that differentiates this tool from other download tools in the list.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines2/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides no guidance on when to use this tool versus alternatives like 'download_medrxiv', 'download_arxiv', or the sibling 'read_biorxiv_paper' tool. It mentions the required parameter but doesn't explain context or prerequisites for usage.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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