Skip to main content
Glama
openags

Paper Search MCP

by openags

search_europepmc

Search academic papers from Europe PMC to find relevant research articles using specific queries and return paper metadata.

Instructions

Search academic papers from Europe PMC.

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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The 'search_europepmc' function in 'server.py' acts as the MCP tool handler. It calls the 'async_search' helper function, delegating the actual work to the 'europepmc_searcher' instance.
    async def search_europepmc(query: str, max_results: int = 10) -> List[Dict]:
        """Search academic papers from Europe PMC.
    
        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(europepmc_searcher, query, max_results)
        return papers if papers else []
  • The 'EuropePMCSearcher.search' method performs the actual API call to the Europe PMC service to retrieve paper results.
    def search(self, query: str, max_results: int = 10, **kwargs) -> List[Paper]:
        """
        Search Europe PMC for biomedical literature.
    
        Args:
            query: Search query string
            max_results: Maximum results to return (Europe PMC default: 25, max: 1000)
            **kwargs: Additional parameters:
                - year: Filter by publication year
                - has_fulltext: Filter by full text availability (True/False)
                - open_access: Filter by open access status (True/False)
                - source: Filter by source (e.g., 'MED', 'PMC', 'AGR')
    
        Returns:
            List[Paper]: List of found papers with metadata
        """
        papers = []
    
        try:
            # Prepare search parameters
            params = {
                'query': query,
                'pageSize': min(max_results, 100),  # Use pageSize parameter
                'format': 'json',
                'resultType': 'core',
            }
    
            # Add optional filters
            if 'year' in kwargs:
                params['year'] = kwargs['year']
            if 'has_fulltext' in kwargs:
                params['has_fulltext'] = 'y' if kwargs['has_fulltext'] else 'n'
            if 'open_access' in kwargs:
                params['open_access'] = 'y' if kwargs['open_access'] else 'n'
            if 'source' in kwargs:
                params['source'] = kwargs['source']
    
            # Europe PMC supports sorting
            if 'sort' in kwargs:
                params['sort'] = kwargs['sort']
    
            # Make API request
            response = self.session.get(f"{self.BASE_URL}/search", params=params, timeout=30)
            response.raise_for_status()
            data = response.json()
    
            # Parse results
            result_list = data.get('resultList', {}).get('result', [])
            for item in result_list:
                try:
                    paper = self._parse_item(item)
                    if paper:
                        papers.append(paper)
                        if len(papers) >= max_results:
                            break
                except Exception as e:
                    logger.warning(f"Error parsing Europe PMC item: {e}")
                    continue
    
            logger.info(f"Europe PMC search returned {len(papers)} papers for query: {query}")
    
        except requests.RequestException as e:
            logger.error(f"Europe PMC search request error: {e}")
        except Exception as e:
            logger.error(f"Unexpected error in Europe PMC search: {e}")
    
        return papers
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 the tool searches and returns paper metadata, but doesn't disclose behavioral traits such as rate limits, authentication needs, error handling, or whether it's a read-only operation. The description is minimal and lacks critical operational context.

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 with clear sections (Args, Returns) and uses minimal sentences. However, the first sentence could be more front-loaded with key details, and some redundancy exists (e.g., 'in dictionary format' might be implied by output schema). Overall, it's efficient but not perfectly optimized.

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 2 parameters with 0% schema coverage and an output schema present, the description provides basic parameter semantics but lacks behavioral context. For a search tool with many siblings, it should include more about when to use it, result format details, or limitations. The output schema reduces the need to explain returns, but overall completeness is minimal.

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 adds meaningful semantics by explaining that 'query' is a search query string with an example, and 'max_results' has a default of 10. This clarifies parameter purposes beyond the bare schema, though it doesn't detail query syntax or result limits.

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 searches academic papers from Europe PMC, providing a specific verb ('search') and resource ('academic papers from Europe PMC'). However, it doesn't differentiate from sibling tools like search_pmc or search_pubmed that might target similar databases, so it doesn't reach the highest 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 like search_pmc or search_pubmed from the sibling list. It mentions the database (Europe PMC) but doesn't explain its scope, strengths, or limitations compared to other search tools available.

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