Skip to main content
Glama

Get World Bank Indicator Data

worldbank_get_data
Read-onlyIdempotent

Queries World Bank indicator values for one or more countries across a time range. The primary data-access tool — use worldbank_search_indicators to find indicator_id values. Returns observations with null values when data is not available for a country×year cell (common for sparse series). Specify either date_range (historical analysis) or mrv (most recent N values), not both. For "all" countries, use pagination (per_page up to 1000) — the API returns several hundred entries per indicator.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
mrvNoReturn the N most recent available values per country (1–100), clamped upstream to the length of the series. Rows are mrv × countries, so page through them with per_page. Mutually exclusive with date_range.
pageNoPagination page number (1-based).
per_pageNoResults per page (default: server default, max: 1000). Use higher values for "all" country queries.
countriesYesCountry codes. Accepts: ISO2 (US, CN), ISO3 (USA, CHN), regional aggregate codes (EAS, LCN, MEA, SAS, SSF, ECS, NAC), income group codes (HIC, UMC, LMC, LIC), world code (WLD), or "all" for every entry (use pagination). Pass a single string or an array of codes for multi-country queries. At least one code is required — an empty value is rejected rather than treated as "all".
date_rangeNoTime window to filter observations to. Accepts a whole year (`2020`), a quarter (`2020Q1`), or a month (`2020M03`), or a range of two periods of the same type separated by a colon, earliest first (`2010:2023`, `2020Q1:2021Q4`, `2020M01:2020M06`). A window and an observation match whenever the periods overlap, so a year window also selects the quarters and months inside it. A window covering no part of the series returns zero observations rather than the full series. Mutually exclusive with mrv.
indicator_idYesIndicator code to query (e.g. NY.GDP.PCAP.CD, SP.POP.TOTL). Use worldbank_search_indicators to find valid IDs.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
dataNoIndicator observations for this page. Null values are common for sparse series.
errorNoPresent when the call failed. Absent on success.
noticeNoRecovery hint for sparse or empty result sets — suggests how to broaden the query.
indicatorNoIndicator metadata echoed from the response.
nullCountNoCount of null values on this page — indicates data sparsity for the requested filter.
totalCountNoTotal observations before pagination.
totalPagesNoTotal number of pages.
currentPageNoCurrent page number.
appliedFiltersNoThe effective parameters sent to the World Bank API — confirms country code normalization and which filters were in force for these observations.

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover read-only, open-world, and idempotent hints. The description goes beyond by disclosing that observations may contain null values for sparse country-year cells, and explains pagination behavior for 'all' queries. It also details the mutual exclusivity of date_range and mrv. These behavioral insights are valuable and do not contradict annotations.

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?

The description is compact, about four sentences, with the primary purpose stated first. It front-loads the core action, then delivers essential caveats (nulls, exclusivity, pagination) in a logical sequence. No wasted words.

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?

Given the rich schema, output schema presence, and annotation coverage, the description sufficiently covers all necessary information for an agent to call the tool correctly. It addresses the main use case, edge cases with nulls, parameter exclusivity, and pagination, leaving no obvious gaps.

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?

The input schema provides 100% coverage with detailed descriptions for every parameter, including accepted formats, mutual exclusivity, and pagination semantics. The description adds minimal extra parameter meaning beyond reinforcing the null-value behavior and the note about pagination for 'all', but does not provide significant new per-parameter insight beyond the schema.

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 clearly states the tool's function: 'Queries World Bank indicator values for one or more countries across a time range.' It identifies itself as the primary data-access tool and explicitly points to worldbank_search_indicators for finding indicator IDs, distinguishing it from the search sibling. The wording is specific and unambiguous.

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?

It provides explicit guidance on when to use this tool (primary data access) and names the alternative (worldbank_search_indicators) for finding IDs. It also explains the mutual exclusivity of date_range and mrv, and advises pagination for 'all' country queries. While it doesn't enumerate exclusions between other siblings, the context is sufficient for appropriate selection.

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.

TDQS

A4.5/5.0
Disambiguation5/5

Each tool has a clearly distinct purpose: metadata retrieval (worldbank_get_country, worldbank_get_indicator, worldbank_list_countries, worldbank_list_sources, worldbank_list_topics), data querying (worldbank_get_data, worldbank_get_poverty), and searching (worldbank_search_indicators, worldbank_search_projects). No two tools overlap in function; even search_indicators vs get_indicator are complementary (search returns IDs, get fetches details).

Naming Consistency5/5

All tools follow a uniform pattern: the 'worldbank_' prefix followed by a consistent verb_noun structure (get_country, get_data, list_sources, search_indicators). The convention is applied uniformly across all 9 tools, with no mixed styles or deviating verbs.

Tool Count5/5

9 tools is well-scoped for a World Bank data server. It covers metadata, discovery, data access, and project search without redundancy. The number is neither too sparse nor overwhelming, and each tool serves a clear role in the domain.

Completeness5/5

The tool surface covers the core workflows: browsing the catalog (topics, sources, indicators), fetching metadata, retrieving time-series data, accessing poverty/inequality data, and exploring the lending portfolio. There are no obvious gaps; the inclusion of pagination and clear chaining (e.g., search → get) makes the set comprehensive.