Compare countries
compare_countriesUse this when the user wants to compare 2 to 12 countries on 1 to 4 World Bank indicators over a year range, for example GDP per capita PPP, inflation, population, unemployment, CO2 or life expectancy. Returns the latest value and year per country, first value, change, CAGR and missing years, a chart, and XLSX, CSV and PDF files with citations. Missing years are not filled. Does not forecast or cover sub-national regions.
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": {
"countries": "<countries>",
"indicators": "<indicators>"
},
"name": "compare_countries"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| end_year | No | Last year, not after the current year, e.g. 2024. Default: last year. | |
| countries | Yes | 2 to 12 countries, e.g. ["DEU", "FRA", "ITA"]. | |
| indicators | Yes | 1 to 4 indicators, e.g. ["NY.GDP.PCAP.PP.CD", "FP.CPI.TOTL.ZG"]. | |
| start_year | No | First year, 1960 or later, e.g. 2000. Default: 14 years before end_year. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| notes | Yes | ||
| years | Yes | ||
| source | Yes | ||
| status | Yes | ||
| countries | Yes | ||
| downloads | Yes | ||
| indicators | Yes |