Skip to main content
Glama
openags

Paper Search MCP

by openags

download_zenodo

Download PDF files from Zenodo using paper identifiers. Save academic papers to specified directories for research and reference.

Instructions

Download PDF for a paper from Zenodo.

Args: paper_id: Zenodo paper identifier. save_path: Directory to save the PDF (default: './downloads'). Returns: str: Path to downloaded PDF.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paper_idYes
save_pathNo./downloads

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The MCP tool handler function `download_zenodo` in the server.py, which calls the ZenodoSearcher helper.
    async def download_zenodo(paper_id: str, save_path: str = "./downloads") -> str:
        """Download PDF for a paper from Zenodo.
    
        Args:
            paper_id: Zenodo paper identifier.
            save_path: Directory to save the PDF (default: './downloads').
        Returns:
            str: Path to downloaded PDF.
        """
        return zenodo_searcher.download_pdf(paper_id, save_path)
  • The actual implementation of `download_pdf` within the `ZenodoSearcher` class, which handles the file downloading logic.
    def download_pdf(self, paper_id: str, save_path: str = "./downloads") -> str:
        """Download an open-access PDF from Zenodo.
    
        Args:
            paper_id: Zenodo record ID (numeric string or full DOI ``10.5281/zenodo.NNNNNN``).
            save_path: Directory to save the PDF.
    
        Returns:
            Absolute path to the saved PDF, or an error message.
        """
        import re
        import os
    
        record_id = self._extract_record_id(paper_id)
        if not record_id:
            return f"Could not determine Zenodo record ID from: {paper_id}"
    
        try:
            response = self.session.get(
                f"{self.BASE_URL}/records/{record_id}", timeout=20
            )
            response.raise_for_status()
            record = response.json()
        except Exception as exc:
            return f"Failed to fetch Zenodo record {record_id}: {exc}"
    
        pdf_url = self._find_pdf_url(record)
        if not pdf_url:
            return (
                f"No open-access PDF found for Zenodo record {record_id}.  "
                "The record may be embargoed or restricted."
            )
    
        os.makedirs(save_path, exist_ok=True)
        safe_name = re.sub(r"[^a-zA-Z0-9._-]+", "_", record_id) or record_id
        output_path = os.path.join(save_path, f"zenodo_{safe_name}.pdf")
    
        try:
            dl_response = self.session.get(pdf_url, stream=True, timeout=60)
            dl_response.raise_for_status()
            with open(output_path, "wb") as fh:
                for chunk in dl_response.iter_content(chunk_size=8192):
                    fh.write(chunk)
            return output_path
        except Exception as exc:
            return f"Failed to download PDF from {pdf_url}: {exc}"
Behavior2/5

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

No annotations are provided, so the description carries full burden. It mentions downloading a PDF and returning a path, but lacks critical behavioral details: whether it requires authentication, rate limits, error handling (e.g., if paper_id is invalid), file naming conventions, or network/timeout behavior. For a download operation with zero annotation coverage, this is insufficient.

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 well-structured and concise. It starts with a clear purpose statement, then lists arguments and returns in a formatted way. Every sentence earns its place with no wasted words, and information is front-loaded appropriately.

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 no annotations, 0% schema description coverage, but an output schema exists (returns str path), the description is moderately complete. It covers purpose and parameters adequately but misses behavioral context like error conditions or prerequisites. The output schema handles return values, so that's not needed in the description.

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 clear semantics for both parameters: 'paper_id' as the Zenodo identifier and 'save_path' as the directory with a default. This adds meaningful context beyond the bare schema, though it doesn't specify format constraints (e.g., paper_id structure).

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Download PDF for a paper from Zenodo.' This specifies the verb (download), resource (PDF for a paper), and source (Zenodo). However, it doesn't explicitly distinguish this tool from its sibling 'read_zenodo_paper' or other download tools, which would be needed for a perfect score.

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. With many sibling tools like 'download_arxiv', 'download_biorxiv', and 'read_zenodo_paper', there's no indication of when Zenodo is the appropriate source or when downloading vs. reading is preferred. Only basic parameter defaults are mentioned.

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