Skip to main content
Glama
martinfrasch

ResearchTwin

get_papers

Retrieve a researcher's publications with citation counts from Semantic Scholar and Google Scholar, providing titles, years, and URLs for academic analysis.

Instructions

Get a researcher's publications with citation counts.

Args: slug: Researcher identifier.

Returns papers from Semantic Scholar and Google Scholar (merged, deduplicated) with titles, years, citation counts, and URLs.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_papers tool handler function. Takes a researcher slug parameter, fetches papers from the ResearchTwin API endpoint /api/researcher/{slug}/papers, and returns a formatted markdown list of publications with years and citation counts.
    @mcp.tool(annotations=ToolAnnotations(title="Get Papers", read_only_hint=True))
    async def get_papers(slug: str) -> str:
        """Get a researcher's publications with citation counts.
    
        Args:
            slug: Researcher identifier.
    
        Returns papers from Semantic Scholar and Google Scholar (merged, deduplicated)
        with titles, years, citation counts, and URLs.
        """
        data = await _get(f"/api/researcher/{slug}/papers")
        items = data.get("items", [])
        if not items:
            return f"No papers found for {slug}."
    
        lines = []
        for p in items[:20]:
            year = p.get("year") or "?"
            cites = p.get("citations", 0)
            lines.append(f"- [{year}] **{p['title']}** ({cites} citations)")
    
        return f"**{data.get('total', len(items))} papers for {slug}:**\n" + "\n".join(lines)
  • The _get helper function used by get_papers (and other tools) to make HTTP GET requests to the ResearchTwin API with proper timeout handling.
    async def _get(path: str, params: dict | None = None) -> dict:
        """Make a GET request to the ResearchTwin API."""
        async with httpx.AsyncClient(timeout=TIMEOUT) as client:
            resp = await client.get(f"{BASE_URL}{path}", params=params)
            resp.raise_for_status()
            return resp.json()
  • Import of httpx for HTTP requests and MCP framework components including FastMCP and ToolAnnotations which define the tool's metadata and schema annotations.
    import httpx
    from mcp.server import FastMCP
    from mcp.types import ToolAnnotations
Behavior4/5

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

Annotations only provide a title, so the description carries the burden of behavioral disclosure. It adds valuable context beyond annotations by specifying data sources (Semantic Scholar and Google Scholar), merging and deduplication processes, and the return format (titles, years, citation counts, URLs). However, it lacks details on rate limits, error handling, or authentication needs.

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

Conciseness5/5

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

The description is front-loaded with the core purpose, followed by structured sections for Args and Returns. Every sentence adds value without redundancy, making it efficient and well-organized for quick understanding.

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 has an output schema, the description need not detail return values, and it adequately covers the input parameter and behavioral context. However, it could be more complete by addressing potential issues like handling invalid slugs or data source availability, but it's sufficient for a read-only tool with good annotations.

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

Parameters4/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 explains that 'slug' is a 'Researcher identifier', adding meaning beyond the schema's generic 'Slug' title. This clarifies the parameter's purpose, though it could provide more details on format or examples.

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 verb ('Get') and resource ('a researcher's publications with citation counts'), making the purpose specific. It distinguishes from sibling tools like 'get_profile' or 'list_researchers' by focusing on publications rather than profiles or lists of researchers.

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

Usage Guidelines3/5

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

The description implies usage by specifying it retrieves publications for a researcher, but it does not explicitly state when to use this tool versus alternatives like 'get_profile' or 'get_context'. No exclusions or clear alternatives are mentioned, leaving some ambiguity.

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/martinfrasch/researchtwin'

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