Skip to main content
Glama
openags

Paper Search MCP

by openags

read_zenodo_paper

Extract text content from Zenodo research papers by providing the paper identifier to access and process academic documents.

Instructions

Read and extract text content from a Zenodo paper.

Args: paper_id: Zenodo paper identifier. save_path: Directory where the PDF is/will be saved (default: './downloads'). Returns: str: Extracted text content.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
paper_idYes
save_pathNo./downloads

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The implementation of `read_paper` which downloads a PDF from Zenodo and extracts its text.
    def read_paper(self, paper_id: str, save_path: str = "./downloads") -> str:
        """Download and extract text from a Zenodo PDF.
    
        Args:
            paper_id: Zenodo record ID or DOI.
            save_path: Directory where the PDF is/will be saved.
    
        Returns:
            Extracted text content or error message.
        """
        path = self.download_pdf(paper_id, save_path)
        if not path.endswith(".pdf"):
            return path  # error message
    
        try:
            try:
                from PyPDF2 import PdfReader
            except ImportError:
                from pypdf import PdfReader
    
            reader = PdfReader(path)
            text_parts = [page.extract_text() for page in reader.pages if page.extract_text()]
            return "\n\n".join(text_parts) if text_parts else "No extractable text in PDF."
        except ImportError:
            return f"PDF downloaded to {path}. Install 'PyPDF2' or 'pypdf' to extract text."
        except Exception as exc:
            return f"PDF downloaded to {path} but text extraction failed: {exc}"
  • MCP tool handler registration for `read_zenodo_paper` in `server.py`.
    async def read_zenodo_paper(paper_id: str, save_path: str = "./downloads") -> str:
        """Read and extract text content from a Zenodo paper.
    
        Args:
            paper_id: Zenodo paper identifier.
            save_path: Directory where the PDF is/will be saved (default: './downloads').
        Returns:
            str: Extracted text content.
        """
        return zenodo_searcher.read_paper(paper_id, save_path)
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 and saving a PDF ('where the PDF is/will be saved'), implying file system operations, but doesn't disclose behavioral traits like error handling, network dependencies, permissions needed for save_path, or whether it performs OCR/extraction from PDFs. For a tool with no annotations, this leaves significant gaps.

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

Conciseness4/5

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

The description is well-structured and concise: a clear purpose statement followed by Args and Returns sections. Each sentence adds value without redundancy. However, the 'Args' and 'Returns' labels are slightly verbose compared to integrating details into prose.

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 coverage, but an output schema exists (returns 'str'), the description is moderately complete. It covers purpose and parameters basically, but lacks behavioral context (e.g., extraction method, errors) and doesn't fully address the complexity of a tool that downloads and processes PDFs. The output schema reduces need to explain return values.

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

Parameters3/5

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

Schema description coverage is 0%, so the schema provides no parameter descriptions. The description adds basic semantics: 'paper_id: Zenodo paper identifier' and 'save_path: Directory where the PDF is/will be saved (default: './downloads').' This clarifies purpose and default, but doesn't detail format (e.g., Zenodo ID structure) or constraints (e.g., path validity). It partially compensates for the schema gap.

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: 'Read and extract text content from a Zenodo paper.' It specifies the verb ('read and extract'), resource ('Zenodo paper'), and output ('text content'). However, it doesn't explicitly differentiate from sibling tools like 'download_zenodo' or 'read_arxiv_paper' beyond the Zenodo source.

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 for different sources (e.g., 'read_arxiv_paper', 'download_zenodo'), there's no indication of when this specific Zenodo reading tool is preferred, what prerequisites exist, or when other tools might be better suited.

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