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
| Name | Required | Description | Default |
|---|---|---|---|
| coo | No | ||
| coa | No | ||
| year | No | ||
| coo_all | No | ||
| coa_all | No |
Implementation Reference
- src/unhcr_mcp/server.py:225-248 (handler)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 )
- src/unhcr_mcp/server.py:100-103 (helper)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)
- src/unhcr_mcp/api_client.py:78-81 (helper)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)