Rank countries
rank_countriesUse this when the user wants countries ranked on one World Bank indicator for a year, optionally within a region or income group, for example the highest life expectancy in Sub-Saharan Africa. Aggregates are excluded; ties share a rank; countries without a value are listed separately. Returns the top entries and XLSX, CSV and PDF files with the full ranking. Does not combine indicators into a score.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"indicator": "<indicator>"
},
"name": "rank_countries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | No | Year, e.g. 2022. Leave out to use the latest year in which at least half of the filtered countries have a value. | |
| limit | No | How many top entries to show in chat, 1 to 50, e.g. 10. Files hold the full ranking. Default 20. | |
| order | No | desc for highest first (default), asc for lowest first, e.g. asc. | |
| region | No | World Bank region code, e.g. SSF for Sub-Saharan Africa, ECS Europe & Central Asia, EAS East Asia & Pacific, LCN Latin America & Caribbean, MEA Middle East, North Africa, Afghanistan & Pakistan, NAC North America, SAS South Asia. | |
| indicator | Yes | World Development Indicators code or common name, e.g. SP.DYN.LE00.IN or life expectancy. | |
| income_group | No | World Bank income group, e.g. HIC for high income, UMC upper middle, LMC lower middle, LIC low income. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| year | Yes | ||
| order | Yes | ||
| shown | No | ||
| filter | Yes | ||
| source | Yes | ||
| status | Yes | ||
| ranking | Yes | ||
| downloads | Yes | ||
| indicator | Yes | ||
| with_data | Yes | ||
| year_rule | No | ||
| without_data | Yes | ||
| countries_in_filter | Yes |