Skip to main content
Glama

get_details

Retrieve article metadata from arXiv using title or arXiv ID to access publication details for research and analysis.

Instructions

Retrieve metadata of an article by title or arXiv ID.

Args: title: Article title. arxiv_id: arXiv ID.

Returns: JSON string containing article details or structured error JSON.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleNo
arxiv_idNo

Implementation Reference

  • The handler function for the 'get_details' MCP tool. It fetches and formats arXiv article metadata as JSON, using either title or arXiv ID.
    @mcp.tool() async def get_details(title: Optional[str] = None, arxiv_id: Optional[str] = None) -> str: """ Retrieve metadata of an article by title or arXiv ID. Args: title: Article title. arxiv_id: arXiv ID. Returns: JSON string containing article details or structured error JSON. """ if arxiv_id: # Quick path via ID res = await resolve_article(arxiv_id=arxiv_id) if isinstance(res, str): return res _, vid = res # Fetch the /abs entry for richer fields params = {"search_query": f"id:{vid}", "start": 0, "max_results": 1} data = await make_api_call(f"{ARXIV_API_BASE}/query", params=params) if data is None: return _error("API_ERROR", "Unable to retrieve data from arXiv.org.") feed = feedparser.parse(data) if not feed.entries: return _error("NOT_FOUND", f"No metadata for {vid}") info = feed.entries[0] else: info = await fetch_information(title or "") if isinstance(info, str): return _error("NOT_FOUND", str(info)) entry_id = info.id link = info.link article_title = info.title authors = [author["name"] for author in info.authors] vid = entry_id.split("/abs/")[-1] direct_pdf_url = f"https://arxiv.org/pdf/{vid}" updated = getattr(info, "updated", "Unknown") published = getattr(info, "published", "Unknown") summary = getattr(info, "summary", "Unknown") info_dict = { "arXiv ID": vid, "Title": article_title, "Authors": authors, "Link": link, "Direct PDF URL": direct_pdf_url, "Published": published, "Updated": updated, "Summary": summary, } return json.dumps(info_dict)

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/lecigarevolant/arxiv-mcp-server-gpt'

If you have feedback or need assistance with the MCP directory API, please join our Discord server