download_semantic
Download PDF files from Semantic Scholar using paper IDs, DOIs, arXiv IDs, or URLs to save academic papers for research and reference.
Instructions
Download PDF of a Semantic Scholar paper.
Args: paper_id: Semantic Scholar paper ID, Paper identifier in one of the following formats: - Semantic Scholar ID (e.g., "649def34f8be52c8b66281af98ae884c09aef38b") - DOI: (e.g., "DOI:10.18653/v1/N18-3011") - ARXIV: (e.g., "ARXIV:2106.15928") - MAG: (e.g., "MAG:112218234") - ACL: (e.g., "ACL:W12-3903") - PMID: (e.g., "PMID:19872477") - PMCID: (e.g., "PMCID:2323736") - URL: (e.g., "URL:https://arxiv.org/abs/2106.15928v1") save_path: Directory to save the PDF (default: './downloads'). Returns: Path to the downloaded PDF file.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| paper_id | Yes | ||
| save_path | No | ./downloads |
Implementation Reference
- paper_search_mcp/server.py:620-637 (handler)The `download_semantic` function is the handler that implements the downloading logic for Semantic Scholar papers by delegating to `semantic_searcher.download_pdf`.
async def download_semantic(paper_id: str, save_path: str = "./downloads") -> str: """Download PDF of a Semantic Scholar paper. Args: paper_id: Semantic Scholar paper ID, Paper identifier in one of the following formats: - Semantic Scholar ID (e.g., "649def34f8be52c8b66281af98ae884c09aef38b") - DOI:<doi> (e.g., "DOI:10.18653/v1/N18-3011") - ARXIV:<id> (e.g., "ARXIV:2106.15928") - MAG:<id> (e.g., "MAG:112218234") - ACL:<id> (e.g., "ACL:W12-3903") - PMID:<id> (e.g., "PMID:19872477") - PMCID:<id> (e.g., "PMCID:2323736") - URL:<url> (e.g., "URL:https://arxiv.org/abs/2106.15928v1") save_path: Directory to save the PDF (default: './downloads'). Returns: Path to the downloaded PDF file. """ return semantic_searcher.download_pdf(paper_id, save_path) - paper_search_mcp/server.py:619-620 (registration)The tool is registered with the MCP server using the `@mcp.tool()` decorator.
@mcp.tool() async def download_semantic(paper_id: str, save_path: str = "./downloads") -> str: