Skip to main content
Glama
martinfrasch

ResearchTwin

get_datasets

Retrieve a researcher's datasets with QIC scores, DOIs, download counts, and FAIR-based quality assessments to evaluate research impact.

Instructions

Get a researcher's datasets with QIC (Quality x Impact x Collaboration) scores.

Args: slug: Researcher identifier.

Returns Figshare datasets with DOIs, download/view counts, and QIC scores computed using FAIR-based quality assessment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes

Implementation Reference

  • The get_datasets tool handler function that fetches a researcher's datasets with QIC scores from the ResearchTwin API endpoint /api/researcher/{slug}/datasets, formats the results with titles, QIC scores, and download counts, and returns a formatted string response.
    @mcp.tool(annotations=ToolAnnotations(title="Get Datasets", read_only_hint=True))
    async def get_datasets(slug: str) -> str:
        """Get a researcher's datasets with QIC (Quality x Impact x Collaboration) scores.
    
        Args:
            slug: Researcher identifier.
    
        Returns Figshare datasets with DOIs, download/view counts, and QIC scores
        computed using FAIR-based quality assessment.
        """
        data = await _get(f"/api/researcher/{slug}/datasets")
        items = data.get("items", [])
        if not items:
            return f"No datasets found for {slug}."
    
        lines = []
        for ds in items:
            qic = ds.get("qic_score", 0)
            lines.append(f"- **{ds['title']}** (QIC: {qic}, downloads: {ds.get('downloads', 0)})")
    
        return f"**{data.get('total', len(items))} datasets for {slug}:**\n" + "\n".join(lines)
  • Tool registration via @mcp.tool() decorator with ToolAnnotations specifying the title 'Get Datasets' and read_only_hint=True. This registers the get_datasets function as an MCP tool with the FastMCP framework.
    @mcp.tool(annotations=ToolAnnotations(title="Get Datasets", read_only_hint=True))
  • The _get helper function that makes async HTTP GET requests to the ResearchTwin API. Used by get_datasets and other tools to communicate with the backend API endpoints.
    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()
  • Function signature and docstring defining the input schema for get_datasets tool. Accepts a 'slug' parameter (researcher identifier) and documents the expected return format including Figshare datasets with DOIs, download/view counts, and QIC scores.
    async def get_datasets(slug: str) -> str:
        """Get a researcher's datasets with QIC (Quality x Impact x Collaboration) scores.
    
        Args:
            slug: Researcher identifier.
    
        Returns Figshare datasets with DOIs, download/view counts, and QIC scores
        computed using FAIR-based quality assessment.
        """

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