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

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)

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