read_pubmed_paper
Extract text content from PubMed papers using PMID identifiers to access scientific literature for research and analysis purposes.
Instructions
Read and extract text content from a PubMed paper.
Args: paper_id: PubMed ID (PMID). save_path: Directory where the PDF would be saved (unused). Returns: str: Message indicating that direct paper reading is not supported.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paper_id | Yes | ||
| save_path | No | ./downloads |
Implementation Reference
- paper_search_mcp/server.py:538-547 (handler)The MCP tool wrapper function 'read_pubmed_paper' which delegates the request to the 'pubmed_searcher' instance.
async def read_pubmed_paper(paper_id: str, save_path: str = "./downloads") -> str: """Read and extract text content from a PubMed paper. Args: paper_id: PubMed ID (PMID). save_path: Directory where the PDF would be saved (unused). Returns: str: Message indicating that direct paper reading is not supported. """ return pubmed_searcher.read_paper(paper_id, save_path) - The actual implementation of 'read_paper' within the 'PubMedSearcher' class, which returns a message explaining that reading full text is not supported.
def read_paper(self, paper_id: str, save_path: str = "./downloads") -> str: """Attempt to read and extract text from a PubMed paper. Args: paper_id: PubMed ID (PMID) save_path: Directory for potential PDF storage (unused) Returns: str: Error message indicating PDF reading is not supported """ message = ("PubMed papers cannot be read directly through this tool. " "Only metadata and abstracts are available through PubMed's API. " "Please use the paper's DOI or URL to access the full text on the publisher's website.") return message