get_details
Retrieve article details from arXiv.org by searching with the title. Get arXiv ID, authors, PDF link, timestamps, and summary.
Instructions
Retrieve information of an article hosted on arXiv.org based on its title. This tool searches for the article based on its title and retrieves arXiv ID, title, authors, link, direct PDF URL, published timestamp, last updated timestamp, and summary.
Args: title: Article title.
Returns: A JSON-formatted string containing article details if retrieval is successful; otherwise, a plain error message string.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | Yes |
Implementation Reference
- src/arxiv_server/server.py:180-216 (handler)Implementation of the 'get_details' tool handler. Decorated with @mcp.tool() for registration. Fetches arXiv article details based on title and returns JSON.@mcp.tool() async def get_details(title: str) -> str: """ Retrieve information of an article hosted on arXiv.org based on its title. This tool searches for the article based on its title and retrieves arXiv ID, title, authors, link, direct PDF URL, published timestamp, last updated timestamp, and summary. Args: title: Article title. Returns: A JSON-formatted string containing article details if retrieval is successful; otherwise, a plain error message string. """ info = await fetch_information(title) if isinstance(info, str): return info id = info.id link = info.link article_title = info.title authors = [author['name'] for author in info.authors] arxiv_id = id.split("/abs/")[-1] direct_pdf_url = f"https://arxiv.org/pdf/{arxiv_id}" updated = getattr(info, "updated", "Unknown") published = getattr(info, "published", "Unknown") summary = getattr(info, "summary", "Unknown") info_dict = { "arXiv ID": arxiv_id, "Title": article_title, "Authors": authors, "Link": link, "Direct PDF URL": direct_pdf_url, "Published": published, "Updated": updated, "Summary": summary } return json.dumps(info_dict)