Skip to main content
Glama
martinfrasch

ResearchTwin

get_repos

Retrieve a researcher's GitHub repositories with QIC quality scores, stars, forks, and language data for code assessment.

Instructions

Get a researcher's code repositories with QIC scores.

Args: slug: Researcher identifier.

Returns GitHub repositories with stars, forks, language, and QIC scores computed using FAIR-based quality assessment.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
slugYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The get_repos tool handler - an async function that fetches a researcher's code repositories with QIC scores. It makes an HTTP GET request to /api/researcher/{slug}/repos, processes the response items, and formats them into a human-readable string showing repository names, programming languages, star counts, QIC scores, and descriptions.
    @mcp.tool(annotations=ToolAnnotations(title="Get Repositories", read_only_hint=True))
    async def get_repos(slug: str) -> str:
        """Get a researcher's code repositories with QIC scores.
    
        Args:
            slug: Researcher identifier.
    
        Returns GitHub repositories with stars, forks, language, and QIC scores
        computed using FAIR-based quality assessment.
        """
        data = await _get(f"/api/researcher/{slug}/repos")
        items = data.get("items", [])
        if not items:
            return f"No repositories found for {slug}."
    
        lines = []
        for repo in items:
            qic = repo.get("qic_score", 0)
            lang = repo.get("language") or "?"
            lines.append(
                f"- **{repo['name']}** ({lang}, {repo.get('stars', 0)} stars, QIC: {qic})"
                + (f" — {repo['description']}" if repo.get("description") else "")
            )
    
        return f"**{data.get('total', len(items))} repos for {slug}:**\n" + "\n".join(lines)
  • The @mcp.tool decorator registers the get_repos function as an MCP tool with title 'Get Repositories' and read_only_hint=True annotation.
    @mcp.tool(annotations=ToolAnnotations(title="Get Repositories", read_only_hint=True))
  • The _get helper function used by get_repos and other tools to make HTTP GET requests to the ResearchTwin API. It handles async HTTP client creation, request execution, and JSON response parsing.
    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()
  • Schema definition embedded in docstring - defines the tool's input parameter (slug: Researcher identifier) and describes the output format (GitHub repositories with stars, forks, language, and QIC scores computed using FAIR-based quality assessment).
    """Get a researcher's code repositories with QIC scores.
    
    Args:
        slug: Researcher identifier.
    
    Returns GitHub repositories with stars, forks, language, and QIC scores
    computed using FAIR-based quality assessment.
    """
Behavior3/5

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

Annotations only provide a title, so the description carries full burden. It discloses the tool fetches GitHub repositories with specific metrics (stars, forks, language, QIC scores) and mentions FAIR-based assessment, but doesn't cover rate limits, authentication needs, or pagination behavior. It adds useful context but leaves behavioral gaps.

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 efficiently structured with a purpose statement, Args section, and Returns explanation in just a few sentences. Every sentence adds value, and it's front-loaded with the core functionality.

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 (so return values don't need explanation), 1 parameter with partial documentation, and no annotations, the description is reasonably complete. It covers purpose, parameter meaning, and output content, though could benefit from more behavioral details like error handling.

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?

With 0% schema description coverage and 1 parameter, the description compensates well by explaining 'slug' as a 'Researcher identifier' in the Args section, adding meaning beyond the bare schema. However, it doesn't specify format or examples for the slug.

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 code repositories'), specifies the unique QIC score feature, and distinguishes from siblings like get_papers or get_datasets by focusing on code repositories with quality metrics.

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 for researchers' code repositories with quality assessment, but doesn't explicitly state when to use this vs. alternatives like list_researchers or get_profile. It provides context but lacks explicit guidance on 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/martinfrasch/researchtwin'

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