Skip to main content
Glama
rvibek

UNHCR Population Data MCP Server

get_solutions

Retrieve UNHCR data on durable solutions for displaced populations, including refugee returns, resettlement, naturalization, and IDP returns, with filters for countries and years.

Instructions

    Get figures on durable solutions from UNHCR which includes refugee returnees (returned_refugees), resettlement, naturalisation, retuned IDPs (returned_idps)

    Args:
        coo: Country of origin filter (ISO3 code, comma-separated for multiple)
        coa: Country of asylum filter (ISO3 code, comma-separated for multiple)
        year: Year filter (comma-separated for multiple years) - defaults to 2025
        coo_all: Set to True when analyzing decisions breakdown BY NATIONALITY
        coa_all: Set to True when analyzing decisions breakdown BY COUNTRY

    Returns:
        Solutions data from UNHCR API
    

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
cooNo
coaNo
yearNo
coo_allNo
coa_allNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The primary MCP tool handler for get_solutions. This function is decorated with @server.tool() and implements the tool logic by calling the api_client helper.
    @server.tool()
    def get_solutions(
        coo: str | None = None,
        coa: str | None = None,
        year: str | int | None = None,
        coo_all: bool = False,
        coa_all: bool = False,
    ) -> dict[str, Any]:
        """
        Get figures on durable solutions from UNHCR which includes refugee returnees (returned_refugees), resettlement, naturalisation, retuned IDPs (returned_idps)
    
        Args:
            coo: Country of origin filter (ISO3 code, comma-separated for multiple)
            coa: Country of asylum filter (ISO3 code, comma-separated for multiple)
            year: Year filter (comma-separated for multiple years) - defaults to 2025
            coo_all: Set to True when analyzing decisions breakdown BY NATIONALITY
            coa_all: Set to True when analyzing decisions breakdown BY COUNTRY
    
        Returns:
            Solutions data from UNHCR API
        """
        return api_client.get_solutions(
            coo=coo, coa=coa, year=year, coo_all=coo_all, coa_all=coa_all
        )
  • Helper method in the UNHCRAPIClient class that fetches data from the UNHCR 'solutions' API endpoint using the generic _fetch method.
    def get_solutions(self, coo: Optional[str] = None, coa: Optional[str] = None, 
                      year: Optional[Union[str, int]] = None, coo_all: bool = False, 
                      coa_all: bool = False) -> dict[str, Any]:
        return self._fetch("solutions", coo=coo, coa=coa, year=year, coo_all=coo_all, coa_all=coa_all)
  • Identical helper method defined in the standalone api_client.py file, though not directly used by the MCP server.
    def get_solutions(self, coo: Optional[str] = None, coa: Optional[str] = None, 
                      year: Optional[Union[str, int]] = None, coo_all: bool = False, 
                      coa_all: bool = False) -> Dict[str, Any]:
        return self._fetch("solutions", coo=coo, coa=coa, year=year, coo_all=coo_all, coa_all=coa_all)
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool retrieves data from the UNHCR API, implying a read-only operation, but doesn't mention rate limits, authentication requirements, error handling, or data freshness. For a data-fetching tool with zero annotation coverage, this leaves significant gaps in understanding its operational 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 with two main sections: a purpose statement and parameter explanations. The Args/Returns structure is clear, though the purpose sentence could be slightly more front-loaded. No redundant information is present.

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 5 parameters with 0% schema coverage and no annotations, the description does an excellent job explaining parameter semantics. The presence of an output schema means return values don't need explanation. However, for a data retrieval tool, additional context about data sources, update frequency, or limitations would enhance completeness.

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

Parameters5/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 fully compensate. It provides clear explanations for all 5 parameters: coo and coa as ISO3 code filters (with comma-separated multiple values), year with default and format, and coo_all/coa_all with specific use cases for breakdown analysis. This adds substantial meaning beyond the bare schema.

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

Purpose4/5

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

The description clearly states the tool retrieves UNHCR durable solutions figures with specific categories listed (refugee returnees, resettlement, naturalisation, returned IDPs). It uses a specific verb ('Get') and identifies the resource, though it doesn't explicitly differentiate from sibling tools like get_population_data or get_demographics_data.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus the sibling tools (get_demographics_data, get_population_data, get_rsd_applications, get_rsd_decisions). The description mentions analyzing breakdowns by nationality or country with coo_all/coa_all parameters, but this is parameter semantics rather than usage context.

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/rvibek/mcp_unhcr'

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