Skip to main content
Glama

Compare countries

compare_countries
Read-onlyIdempotent

Use 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

NameRequiredDescriptionDefault
end_yearNoLast year, not after the current year, e.g. 2024. Default: last year.
countriesYes2 to 12 countries, e.g. ["DEU", "FRA", "ITA"].
indicatorsYes1 to 4 indicators, e.g. ["NY.GDP.PCAP.PP.CD", "FP.CPI.TOTL.ZG"].
start_yearNoFirst year, 1960 or later, e.g. 2000. Default: 14 years before end_year.

Output Schema

NameRequiredDescriptionDefault
notesYes
yearsYes
sourceYes
statusYes
countriesYes
downloadsYes
indicatorsYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.7/5.0
Behavior5/5

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

Annotations already declare a safe, idempotent, read-only, open-world operation, yet the description goes further by disclosing the exact return payload (latest value and year, first value, change, CAGR, missing years, chart, XLSX/CSV/PDF with citations) and the key data-integrity rule that missing years are not filled. That fills the one behavioral risk an analyst would care about — silent gap-filling — which the annotations cannot express.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Three sentences, front-loaded with the usage trigger, then payload, then exclusions — each sentence carries distinct information with no repetition of the name or title. Nothing could be removed without losing a constraint or a routing cue.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a multi-parameter analytical tool with an output schema, the description covers selection criteria, input bounds, output shape, and data caveats. An agent has everything needed to decide to call it and to set expectations about the result without opening the schema.

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

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so the baseline would be 3; the description earns a bump by stating the accepted bounds (2–12 countries, 1–4 indicators) and naming indicator phrasings beyond raw codes (GDP per capita PPP, inflation, CO2, life expectancy). It adds little on the year parameters beyond what the schema's defaults already state.

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

Purpose5/5

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

The description opens with a specific verb+resource+scope: comparing 2 to 12 countries on 1 to 4 World Bank indicators over a year range, with concrete example indicators. The bounded cardinalities and the explicit exclusion of forecasting and sub-national regions make it distinguishable from a generic ranking or indicator-search tool.

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

Usage Guidelines4/5

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

"Use this when the user wants to compare..." gives a clear triggering condition, and "Does not forecast or cover sub-national regions" supplies an explicit when-not. The only gap is that the sibling rank_countries is never named, so the agent must infer the compare-vs-rank routing itself.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources