Skip to main content
Glama
openags

Paper Search MCP

by openags

search_zenodo

Search academic papers from Zenodo open repository using query terms to find relevant research publications.

Instructions

Search academic papers from Zenodo open repository.

Args: query: Search query string (e.g., 'machine learning'). max_results: Maximum number of papers to return (default: 10). Returns: List of paper metadata in dictionary format.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
queryYes
max_resultsNo

Implementation Reference

  • The `search_zenodo` tool implementation, which serves as the MCP tool handler and orchestrates the search using the `ZenodoSearcher` class.
    async def search_zenodo(query: str, max_results: int = 10) -> List[Dict]:
        """Search academic papers from Zenodo open repository.
    
        Args:
            query: Search query string (e.g., 'machine learning').
            max_results: Maximum number of papers to return (default: 10).
        Returns:
            List of paper metadata in dictionary format.
        """
        papers = await async_search(zenodo_searcher, query, max_results)
        return papers if papers else []
  • The `ZenodoSearcher.search` method, which interacts with the Zenodo public REST API to perform the search operation.
    def search(self, query: str, max_results: int = 10, **kwargs) -> List[Paper]:
        """Search Zenodo records.
    
        Args:
            query: Free-text or Elasticsearch query string.
            max_results: Maximum number of results (1–200; Zenodo page limit is 10k).
            **kwargs: Extra filters:
                - ``type``: Record type, e.g. ``"publication"`` (default), ``"dataset"``,
                  ``"image"``, ``"video"``, ``"software"``, ``"poster"``, etc.
                - ``subtype``: Publication subtype, e.g. ``"article"``, ``"preprint"``.
                - ``year``: Filter by publication year (e.g. ``2023``).
                - ``access_right``: ``"open"``, ``"embargoed"``, ``"restricted"``, ``"closed"``.
    
        Returns:
            List of :class:`~paper_search_mcp.paper.Paper` objects.
        """
        max_results = max(1, min(max_results, 200))
    
        params: Dict[str, Any] = {
            "q": query,
            "size": max_results,
            "sort": "mostrecent",
        }
    
        record_type = kwargs.get("type", "publication")
        if record_type:
            params["type"] = record_type
    
        subtype = kwargs.get("subtype", "")
        if subtype:
            params["subtype"] = subtype
    
        access_right = kwargs.get("access_right", "")
        if access_right:
            params["access_right"] = access_right
    
        year = kwargs.get("year")
        if year:
            params["q"] = f"{query} AND publication_date:[{year}-01-01 TO {year}-12-31]"
    
        try:
            response = self.session.get(
                f"{self.BASE_URL}/records", params=params, timeout=20
            )
            response.raise_for_status()
            data = response.json()
        except Exception as exc:
            logger.error("Zenodo search failed: %s", exc)
            return []
    
        papers: List[Paper] = []
        for hit in data.get("hits", {}).get("hits", []):
            paper = self._parse_record(hit)
            if paper:
                papers.append(paper)
    
        return papers
  • Registration of the Zenodo search functionality within the task mapping in the server.
    task_map[source] = search_zenodo(query, max_results_per_source)

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