get_paper_details
Retrieve comprehensive details of a specific arXiv paper by entering its unique ArXiv ID, enabling precise access to research information and metadata.
Instructions
Get detailed information about a specific paper by ArXiv ID.
:param arxiv_id: The ArXiv ID (e.g., '2301.12345')
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| arxiv_id | Yes |
Implementation Reference
- arxiv_searcher/arxiv_mcp.py:277-304 (handler)Synchronous handler function implementing the 'get_paper_details' MCP tool. It retrieves comprehensive metadata for a specific arXiv paper using the arxiv Python library.@mcp.tool def get_paper_details(arxiv_id: str) -> dict: """ Get detailed information about a specific paper by ArXiv ID. :param arxiv_id: The ArXiv ID (e.g., '2301.12345') """ try: search = arxiv.Search(id_list=[arxiv_id]) paper = next(search.results()) return { "title": paper.title, "authors": [a.name for a in paper.authors], "summary": paper.summary, "pdf_url": paper.pdf_url, "published_date": paper.published.strftime("%Y-%m-%d"), "updated_date": paper.updated.strftime("%Y-%m-%d"), "categories": paper.categories, "primary_category": paper.primary_category, "arxiv_id": paper.entry_id.split("/")[-1], "doi": paper.doi, "journal_ref": paper.journal_ref, "comment": paper.comment, } except Exception as e: return {"error": f"Failed to fetch paper details: {str(e)}"}
- Asynchronous handler function implementing the 'get_paper_details' MCP tool for remote/server use. Identical logic to the synchronous version, fetching detailed arXiv paper metadata.@mcp.tool async def get_paper_details(arxiv_id: str) -> dict: """ Get detailed information about a specific paper by ArXiv ID. :param arxiv_id: The ArXiv ID (e.g., '2301.12345') """ try: search = arxiv.Search(id_list=[arxiv_id]) paper = next(search.results()) return { "title": paper.title, "authors": [a.name for a in paper.authors], "summary": paper.summary, "pdf_url": paper.pdf_url, "published_date": paper.published.strftime("%Y-%m-%d"), "updated_date": paper.updated.strftime("%Y-%m-%d"), "categories": paper.categories, "primary_category": paper.primary_category, "arxiv_id": paper.entry_id.split("/")[-1], "doi": paper.doi, "journal_ref": paper.journal_ref, "comment": paper.comment, } except Exception as e: return {"error": f"Failed to fetch paper details: {str(e)}"}
- arxiv_searcher/arxiv_mcp.py:277-277 (registration)Registration of the 'get_paper_details' tool using FastMCP's @mcp.tool decorator.@mcp.tool
- arxiv_searcher/remote_arxiv_mcp.py:275-275 (registration)Registration of the 'get_paper_details' tool using FastMCP's @mcp.tool decorator in the remote version.@mcp.tool