Skip to main content
Glama

Rank countries

rank_countries
Read-onlyIdempotent

Use 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

NameRequiredDescriptionDefault
yearNoYear, e.g. 2022. Leave out to use the latest year in which at least half of the filtered countries have a value.
limitNoHow many top entries to show in chat, 1 to 50, e.g. 10. Files hold the full ranking. Default 20.
orderNodesc for highest first (default), asc for lowest first, e.g. asc.
regionNoWorld 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.
indicatorYesWorld Development Indicators code or common name, e.g. SP.DYN.LE00.IN or life expectancy.
income_groupNoWorld Bank income group, e.g. HIC for high income, UMC upper middle, LMC lower middle, LIC low income.

Output Schema

NameRequiredDescriptionDefault
yearYes
orderYes
shownNo
filterYes
sourceYes
statusYes
rankingYes
downloadsYes
indicatorYes
with_dataYes
year_ruleNo
without_dataYes
countries_in_filterYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observed

TDQS

A4.5/5.0
Behavior5/5

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

Annotations only establish that this is a read-only, idempotent, open-world call. The description adds substantive behavior the annotations cannot: aggregates are excluded from the ranking, ties share a rank, countries lacking a value are listed separately, and the chat response is a truncated top-N backed by XLSX/CSV/PDF full-ranking files.

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, each load-bearing and ordered by importance: trigger condition first, ranking semantics second, return artifacts third. No filler or repetition of the title.

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 six-parameter read tool with full schema coverage, annotations, and an output schema, the description covers the remaining gaps an agent needs: what counts as a valid ranking subject, tie handling, missing-data handling, and the difference between chat output and the exported files.

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

Parameters3/5

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

Schema description coverage is 100%, so every parameter including enum meanings and the year default is already documented. The description only restates the year plus region/income-group filtering in prose and adds no format or edge-case detail beyond the schema's own limit-vs-files note.

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?

States a specific verb and resource (rank countries) on exactly one World Bank indicator, and bounds the scope with region/income-group filters plus a concrete example. The closing line "Does not combine indicators into a score" separates it from the multi-indicator comparison sibling without the agent needing to open compare_countries.

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?

Opens with an explicit trigger condition ("Use this when the user wants countries ranked on one World Bank indicator for a year") and gives a worked example. The exclusion clause rules out combined-indicator scoring, but it never names compare_countries or search_indicators as the preferred alternative for those cases.

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