Skip to main content
Glama
martinfrasch

ResearchTwin

get_network_map

Map researcher geographic distribution by retrieving institutional affiliations and coordinates from ORCID and Semantic Scholar to visualize network locations.

Instructions

Get geographic affiliations for all researchers in the network.

Returns researchers with their institutional affiliations and coordinates, sourced from ORCID and Semantic Scholar. Useful for understanding the geographic distribution of the research network.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • The main handler function that implements get_network_map tool logic. It calls the /api/network/map endpoint, processes researcher affiliation data, and returns a formatted string with geographic information for all researchers in the network.
    async def get_network_map() -> str:
        """Get geographic affiliations for all researchers in the network.
    
        Returns researchers with their institutional affiliations and coordinates,
        sourced from ORCID and Semantic Scholar. Useful for understanding the
        geographic distribution of the research network.
        """
        data = await _get("/api/network/map")
        researchers = data.get("researchers", [])
        if not researchers:
            return "No affiliation data available yet."
    
        lines = []
        for r in researchers:
            affs = r.get("affiliations", [])
            aff_strs = []
            for a in affs:
                loc = [a.get("city"), a.get("country")]
                loc_str = ", ".join(x for x in loc if x)
                status = "current" if a.get("current") else "past"
                aff_strs.append(f"  - {a['institution']}" + (f" ({loc_str})" if loc_str else "") + f" [{status}]")
            lines.append(f"**{r['name']}** (`{r['slug']}`):\n" + "\n".join(aff_strs))
    
        return f"**Network map — {data.get('total_researchers', len(researchers))} researchers:**\n\n" + "\n\n".join(lines)
  • The @mcp.tool decorator that registers get_network_map as an MCP tool with metadata including title 'Get Network Map' and read_only_hint=True.
    @mcp.tool(annotations=ToolAnnotations(title="Get Network Map", read_only_hint=True))
  • The _get() helper utility function that makes async HTTP GET requests to the ResearchTwin API, used by get_network_map to fetch data from /api/network/map endpoint.
    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 ToolAnnotations from mcp.types, which provides the schema/metadata structure for tool definitions (used in the decorator at line 214).
    from mcp.types import ToolAnnotations
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 data sources ('ORCID and Semantic Scholar') and output content ('institutional affiliations and coordinates'), which is useful behavioral context. However, it lacks details on rate limits, error handling, or whether this is a read-only operation (implied but not stated). No contradiction with annotations.

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 appropriately sized and front-loaded: the first sentence states the core purpose, followed by details on returns and usefulness. Every sentence earns its place by adding clarity without redundancy. It's concise and well-structured for easy comprehension.

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 0 parameters, annotations with only a title, and an output schema (which handles return values), the description is mostly complete. It covers purpose, data sources, and use case. However, it could improve by mentioning if the tool is read-only or has any behavioral constraints, but the output schema likely details the return structure, so this is minor.

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?

There are 0 parameters, and schema description coverage is 100%, so no parameter documentation is needed. The description adds value by explaining the scope ('all researchers in the network') and data sources, which compensates for the lack of parameters. Baseline for 0 parameters is 4, as it provides necessary context beyond the empty schema.

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: 'Get geographic affiliations for all researchers in the network.' It specifies the verb ('Get'), resource ('geographic affiliations'), and scope ('all researchers in the network'). It distinguishes from siblings like 'get_profile' (individual researcher) and 'list_researchers' (likely just listing names).

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: 'Useful for understanding the geographic distribution of the research network.' This indicates when to use it—for geographic analysis—but does not explicitly state when not to use it or name alternatives. For example, it doesn't specify if 'get_context' or 'list_researchers' might be better for non-geographic purposes.

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