read_openaire_paper
Extract text content from OpenAIRE research papers by providing a paper identifier. Downloads PDFs to a specified directory and returns the extracted text for analysis.
Instructions
Attempt to read and extract text content from an OpenAIRE paper.
Args: paper_id: OpenAIRE paper identifier. save_path: Directory where the PDF is/will be saved (default: './downloads'). Returns: str: Extracted text or error message.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paper_id | Yes | ||
| save_path | No | ./downloads |
Implementation Reference
- paper_search_mcp/server.py:1082-1091 (handler)This is the MCP tool handler for 'read_openaire_paper'. It delegates the call to the OpenAiresearcher instance.
async def read_openaire_paper(paper_id: str, save_path: str = "./downloads") -> str: """Attempt to read and extract text content from an OpenAIRE paper. Args: paper_id: OpenAIRE paper identifier. save_path: Directory where the PDF is/will be saved (default: './downloads'). Returns: str: Extracted text or error message. """ return openaire_searcher.read_paper(paper_id, save_path) - This is the implementation of 'read_paper' within the OpenAiresearcher class, which currently raises a NotImplementedError, indicating it is not yet supported for OpenAIRE.
def read_paper(self, paper_id: str, save_path: str = "./downloads") -> str: """ Download and extract text from an OpenAIRE paper. Args: paper_id: OpenAIRE paper identifier save_path: Directory where PDF is/will be saved Returns: Extracted text content of the paper Raises: NotImplementedError: If paper reading is not supported """ raise NotImplementedError( f"{self.__class__.__name__} does not support direct paper reading." )