get_paper_details
Retrieve comprehensive details for a specific arXiv paper using its unique ID to access metadata, abstracts, and publication information.
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)Handler function for the 'get_paper_details' tool, decorated with @mcp.tool for registration in FastMCP. Fetches detailed metadata for a specific arXiv paper using the arxiv 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)}"}
- Async handler function for the 'get_paper_details' tool in the remote version, decorated with @mcp.tool. Identical logic to the sync version but async.@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)}"}