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

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

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)
Behavior2/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations are provided, so the description carries the full burden of behavioral disclosure. It states the tool retrieves metadata and returns JSON or error JSON, but does not disclose critical behavioral traits such as whether it requires authentication, rate limits, what happens if both parameters are null, or how it handles ambiguous inputs. For a read operation with zero annotation coverage, this leaves significant gaps in understanding the tool's behavior.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is appropriately sized and front-loaded, with the core purpose stated first, followed by structured sections for arguments and returns. Every sentence adds value, but the 'Args' and 'Returns' sections could be integrated more seamlessly into the flow. It avoids redundancy and is efficient overall.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (2 parameters, no annotations, but with an output schema), the description is mostly complete. It explains the purpose, parameters, and return format. The output schema exists, so the description need not detail return values, but it could better address behavioral aspects like error handling or input constraints. It covers the essentials but has minor gaps in context.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema description coverage is 0%, so the description must compensate. It adds meaning by explaining that 'title' refers to the article title and 'arxiv_id' to the arXiv ID, which clarifies the semantics beyond the schema's type definitions. However, it does not specify format requirements (e.g., arXiv ID pattern), mutual exclusivity, or default behaviors, leaving some ambiguity. With two parameters and low schema coverage, this provides basic but incomplete compensation.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the tool's purpose with a specific verb ('Retrieve') and resource ('metadata of an article'), and distinguishes it from siblings by specifying it returns metadata rather than downloading files, getting URLs, loading content, or searching. It explicitly mentions retrieval by title or arXiv ID, making the scope unambiguous.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

The description provides clear context for when to use this tool (to retrieve article metadata by title or arXiv ID), but does not explicitly state when not to use it or name alternatives among the sibling tools. It implies usage for metadata retrieval rather than other operations, but lacks explicit exclusions or comparisons.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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