Skip to main content
Glama

who-gho-mcp-server

Query WHO GHO Indicator Data

who_query_indicator_data
Read-onlyIdempotent

Query data rows for a single WHO GHO indicator with optional spatial, temporal, and dimension filters. Returns rows with numeric values, uncertainty intervals (Low/High), and spatial/time metadata. This is the primary data-fetching tool in the find-then-query workflow: use who_search_indicators to find the indicator code, optionally call who_get_indicator_metadata to confirm which filter dimensions are valid, then call this tool. Spatial filters are mutually exclusive per call: provide only one of country_codes, region_codes, or income_group_codes — mixing them triggers an error. Omitting all spatial filters returns all geographies (may be large; use limit to cap). The sex filter only applies when the indicator uses SEX as its first cross-cutting dimension — if not, the filter returns empty rows; check who_get_indicator_metadata first if uncertain. Rows are returned in a deterministic order (most recent first by default), so a capped result is the top of a defined slice rather than an arbitrary sample; page through the rest with offset.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
sexNoFilter on sex dimension: SEX_BTSX (both sexes), SEX_FMLE (female), SEX_MLE (male). Only applies when the indicator uses SEX as its first cross-cutting dimension.
sortNoRow ordering: "year_desc" (default) returns the most recent years first, "year_asc" the earliest first. Ties are broken by spatial code, then dimension, then row id.year_desc
limitNoMaximum number of data rows to return. Default 200, max 1000.
offsetNoZero-based row offset for pagination. Default 0. Pages are stable because rows are returned in a deterministic order — read hasMore and nextOffset from the response to continue. An offset at or beyond totalRows returns an empty rows array, not an error.
year_toNoEnd year (inclusive) for the time range filter, e.g. 2023.
year_fromNoStart year (inclusive) for the time range filter, e.g. 2015.
dim1_valueNoValue filter for indicators whose first cross-cutting dimension is not SEX (e.g. an AGEGROUP code like "YEARS05-14"). Ignored when sex is also provided.
region_codesNoWHO region codes to filter on, e.g. ["AFR","EUR","AMR","EMR","SEAR","WPR"]. Returns the aggregate row for each named WHO region — not per-country rows within it. To get country-level data for a region, use who_list_dimension_values with dimension="COUNTRY" and parent_code set to the region code to retrieve the ISO codes for countries in that region, then pass those to country_codes. Use who_list_dimension_values with dimension="REGION" to see all valid region codes. Mutually exclusive with country_codes and income_group_codes.
country_codesNoISO 3166-1 alpha-3 country codes to filter on, e.g. ["JPN","USA","BRA"]. Mutually exclusive with region_codes and income_group_codes.
indicator_codeYesIndicator code to query, e.g. "WHOSIS_000001". Use who_search_indicators to find codes.
income_group_codesNoWorld Bank income group codes, e.g. ["WB_HI","WB_LMI","WB_LI","WB_UMI"]. Use who_list_dimension_values with dimension="WORLDBANKINCOMEGROUP" to see all valid codes. Mutually exclusive with country_codes and region_codes.
include_uncertaintyNoInclude Low and High uncertainty interval bounds in output. Default true.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
rowsNoData rows matching the query.
errorNoPresent when the call failed. Absent on success.
noticeNoPresent when rows were withheld or the requested offset ran past the end of the result set. Explains how to reach the remaining rows.
offsetNoZero-based row offset this page started at.
hasMoreNoTrue when rows remain beyond this page. Pair with nextOffset to continue.
pageInfoNoHuman-readable page position, e.g. "offset 0, showing 200 of 12936". Use to construct the next offset.
totalRowsNoTotal row count matching the query on the server (before the limit is applied).
truncatedNoTrue when the result was capped at the requested limit.
nextOffsetNoOffset to request for the next page. Absent when this page reached the end of the result set.
totalCountNoAlias of totalRows for cross-tool consistency — total rows before the limit.
appliedFiltersNoFilters that were applied to the query.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • changedInput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedInput schema / additionalProperties
      Added value: +false
    • changedOutput schema / $schema
      Previous value: -"http://json-schema.org/draft-07/schema#"New value: +"https://json-schema.org/draft/2020-12/schema"
    • addedOutput schema / anyOf
      Added value: +[
      +  {
      +    "not": {
      +      "required": [
      +        "error"
      +      ]
      +    },
      +    "required": [
      +      "rows",
      +      "appliedFilters",
      +      "totalRows",
      +      "totalCount",
      +      "offset",
      +      "hasMore",
      +      "pageInfo"
      +    ]
      +  },
      +  {
      +    "required": [
      +      "error"
      +    ]
      +  }
      +]
    • addedOutput schema / properties / error
      Added value: +{
      +  "additionalProperties": {},
      +  "description": "Present when the call failed. Absent on success.",
      +  "properties": {
      +    "code": {
      +      "description": "JSON-RPC error code for this failure.",
      +      "maximum": 9007199254740991,
      +      "minimum": -9007199254740991,
      +      "type": "integer"
      +    },
      +    "data": {
      +      "additionalProperties": {},
      +      "properties": {
      +        "reason": {
      +          "description": "Machine-readable failure mode. Declared by this tool: `indicator_not_found`: The indicator code returned HTTP 404 from the GHO API. `no_data`: The indicator exists but no data rows matched the applied filters. `ambiguous_spatial_filter`: More than one of country_codes, region_codes, or income_group_codes were provided. `invalid_year_range`: year_from is greater than year_to, so the time filter can match no rows. `invalid_query`: The GHO API rejected the generated OData query because a supplied filter value is not a valid literal. `malformed_identifier`: indicator_code carries an unpaired UTF-16 surrogate, so it cannot be encoded into the request URL. Other values are possible when a failure originates below the handler.",
      +          "examples": [
      +            "indicator_not_found",
      +            "no_data",
      +            "ambiguous_spatial_filter",
      +            "invalid_year_range",
      +            "invalid_query",
      +            "malformed_identifier"
      +          ],
      +          "type": "string"
      +        },
      +        "recovery": {
      +          "additionalProperties": {},
      +          "description": "Actionable next step for the caller.",
      +          "properties": {
      +            "hint": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "hint"
      +          ],
      +          "type": "object"
      +        },
      +        "retryable": {
      +          "description": "Whether retrying may succeed.",
      +          "type": "boolean"
      +        }
      +      },
      +      "type": "object"
      +    },
      +    "message": {
      +      "description": "Human-readable description of what went wrong.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "code",
      +    "message"
      +  ],
      +  "type": "object"
      +}
    • removedOutput schema / required
      Removed value: -[
      -  "rows",
      -  "appliedFilters",
      -  "totalRows",
      -  "totalCount",
      -  "offset",
      -  "hasMore",
      -  "pageInfo"
      -]
  2. Changed4 schema fields changed
    • changedInput schema / properties / region_codes / description
      Previous value: -"WHO region codes to filter on, e.g. [\"AFR\",\"EUR\",\"AMR\",\"EMR\",\"SEAR\",\"WPR\"]. Returns the aggregate row for each named WHO region — not per-country rows within it. To get country-level data for a region, use who_list_dimension_values with dimension=\"COUNTRY\" and filter by parentCode to retrieve the ISO codes for countries in that region, then pass those to country_codes. Use who_list_dimension_values with dimension=\"REGION\" to see all valid region codes. Mutually exclusive with country_codes and income_group_codes."New value: +"WHO region codes to filter on, e.g. [\"AFR\",\"EUR\",\"AMR\",\"EMR\",\"SEAR\",\"WPR\"]. Returns the aggregate row for each named WHO region — not per-country rows within it. To get country-level data for a region, use who_list_dimension_values with dimension=\"COUNTRY\" and parent_code set to the region code to retrieve the ISO codes for countries in that region, then pass those to country_codes. Use who_list_dimension_values with dimension=\"REGION\" to see all valid region codes. Mutually exclusive with country_codes and income_group_codes."
    • addedOutput schema / properties / rows / items / properties / parentLocation
      Added value: +{
      +  "description": "Name of the WHO region this row sits under, e.g. \"Western Pacific\" for a JPN row. Not a label for spatialDim itself — the upstream row carries no name for its own spatial entity. Absent when spatialDim is already a region or income group.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / rows / items / properties / parentLocationCode
      Added value: +{
      +  "description": "Code of the WHO region this row sits under, e.g. \"WPR\". Pass to region_codes to query that region's own aggregate rows. Absent alongside parentLocation.",
      +  "type": "string"
      +}
    • removedOutput schema / properties / rows / items / properties / spatialLabel
      Removed value: -{
      -  "description": "Human-readable spatial label, e.g. WHO region name for a country row.",
      -  "type": "string"
      -}
  3. Changed10 schema fields changed
    • addedInput schema / properties / offset
      Added value: +{
      +  "default": 0,
      +  "description": "Zero-based row offset for pagination. Default 0. Pages are stable because rows are returned in a deterministic order — read hasMore and nextOffset from the response to continue. An offset at or beyond totalRows returns an empty rows array, not an error.",
      +  "maximum": 9007199254740991,
      +  "minimum": 0,
      +  "type": "integer"
      +}
    • addedInput schema / properties / sort
      Added value: +{
      +  "default": "year_desc",
      +  "description": "Row ordering: \"year_desc\" (default) returns the most recent years first, \"year_asc\" the earliest first. Ties are broken by spatial code, then dimension, then row id.",
      +  "enum": [
      +    "year_desc",
      +    "year_asc"
      +  ],
      +  "type": "string"
      +}
    • addedOutput schema / properties / appliedFilters / properties / ordering
      Added value: +{
      +  "description": "Row ordering applied to the query, e.g. \"most recent first (year_desc)\".",
      +  "type": "string"
      +}
    • changedOutput schema / properties / appliedFilters / required
      Previous value: -[
      -  "indicatorCode"
      -]New value: +[
      +  "indicatorCode",
      +  "ordering"
      +]
    • addedOutput schema / properties / hasMore
      Added value: +{
      +  "description": "True when rows remain beyond this page. Pair with nextOffset to continue.",
      +  "type": "boolean"
      +}
    • addedOutput schema / properties / nextOffset
      Added value: +{
      +  "description": "Offset to request for the next page. Absent when this page reached the end of the result set.",
      +  "type": "number"
      +}
    • changedOutput schema / properties / notice / description
      Previous value: -"Present when the limit was reached and not all rows were returned. Explains how to retrieve additional rows."New value: +"Present when rows were withheld or the requested offset ran past the end of the result set. Explains how to reach the remaining rows."
    • addedOutput schema / properties / offset
      Added value: +{
      +  "description": "Zero-based row offset this page started at.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / pageInfo
      Added value: +{
      +  "description": "Human-readable page position, e.g. \"offset 0, showing 200 of 12936\". Use to construct the next offset.",
      +  "type": "string"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "rows",
      -  "appliedFilters",
      -  "totalRows",
      -  "totalCount"
      -]New value: +[
      +  "rows",
      +  "appliedFilters",
      +  "totalRows",
      +  "totalCount",
      +  "offset",
      +  "hasMore",
      +  "pageInfo"
      +]
  4. Changed3 schema fields changed
    • addedOutput schema / properties / totalCount
      Added value: +{
      +  "description": "Alias of totalRows for cross-tool consistency — total rows before the limit.",
      +  "type": "number"
      +}
    • addedOutput schema / properties / truncated
      Added value: +{
      +  "description": "True when the result was capped at the requested limit.",
      +  "type": "boolean"
      +}
    • changedOutput schema / required
      Previous value: -[
      -  "rows",
      -  "appliedFilters",
      -  "totalRows"
      -]New value: +[
      +  "rows",
      +  "appliedFilters",
      +  "totalRows",
      +  "totalCount"
      +]
  5. Changed2 schema fields changed
    • changedOutput schema / properties / rows / items / properties / year / description
      Previous value: -"Year of the data point."New value: +"Year of the data point. Absent when the upstream row has no TimeDim (time-independent entries)."
    • changedOutput schema / properties / rows / items / required
      Previous value: -[
      -  "indicatorCode",
      -  "year"
      -]New value: +[
      +  "indicatorCode"
      +]
  6. Changed5 schema fields changed
    • addedOutput schema / properties / appliedFilters
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Filters that were applied to the query.",
      +  "properties": {
      +    "dim1Value": {
      +      "description": "dim1_value filter applied, if any.",
      +      "type": "string"
      +    },
      +    "indicatorCode": {
      +      "description": "Indicator code that was queried.",
      +      "type": "string"
      +    },
      +    "sex": {
      +      "description": "Sex filter value applied, if any.",
      +      "type": "string"
      +    },
      +    "spatialFilter": {
      +      "description": "Active spatial filter summary, e.g. \"country_codes: JPN,USA\" or \"region_codes: EUR\".",
      +      "type": "string"
      +    },
      +    "yearRange": {
      +      "description": "Applied year range, e.g. \"2015–2023\". Absent when no year filter was set.",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "indicatorCode"
      +  ],
      +  "type": "object"
      +}
    • addedOutput schema / properties / notice
      Added value: +{
      +  "description": "Present when the limit was reached and not all rows were returned. Explains how to retrieve additional rows.",
      +  "type": "string"
      +}
    • removedOutput schema / properties / truncated
      Removed value: -{
      -  "description": "True when totalRows exceeds the limit and not all rows were returned.",
      -  "type": "boolean"
      -}
    • removedOutput schema / properties / truncatedNote
      Removed value: -{
      -  "description": "Present when truncated is true. Explains how to retrieve additional rows, e.g. by narrowing filters or increasing the limit.",
      -  "type": "string"
      -}
    • changedOutput schema / required
      Previous value: -[
      -  "rows",
      -  "totalRows",
      -  "truncated"
      -]New value: +[
      +  "rows",
      +  "appliedFilters",
      +  "totalRows"
      +]
  7. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already carry readOnlyHint=true, idempotentHint=true, openWorldHint=false, so safety profile is covered. The description adds substantive behavior beyond that: spatial parameter mutual exclusivity with error on mixing, the sex-filter empty-rows caveat, deterministic ordering (most recent first by default) making capped results a defined slice rather than an arbitrary sample, and pagination semantics. This is rich, actionable behavioral context that annotations alone cannot provide.

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

Conciseness4/5

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

The paragraph is dense and front-loaded: core purpose first, workflow second, then constraints and behavioral notes. Every sentence earns its place. Some redundancy exists with the schema (mutual exclusivity repeated in both the description and multiple param descriptions), but for a 12-parameter tool with subtle edge cases, the length is justifiable and well-organized.

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 complex 12-parameter tool, this is complete. Return values are covered by the output schema (present, so description needn't explain them). Annotations cover safety. The description covers the workflow, spatial exclusivity, dimension-filter caveats, ordering guarantees, and pagination stability. Nothing an agent needs to select filters and invoke it correctly is missing.

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% with detailed descriptions on all 12 parameters, so baseline is 3. The description adds coherent value on top: it frames the mutual-exclusivity constraint as a cross-parameter rule, explains the sex/dim1_value dimensionality interplay ('only applies when the indicator uses SEX as its first cross-cutting dimension'), and clarifies the offset-beyond-totalRows behavior returns empty rows not an error. Minor redundancy with schema param text, but the narrative model improves parameter selection.

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 states a specific verb and resource ('Query data rows for a single WHO GHO indicator') with explicit scope (spatial, temporal, dimension filters). It positions itself as 'the primary data-fetching tool' in the find-then-query workflow, clearly distinguishing it from who_search_indicators (code lookup) and who_get_indicator_metadata (filter validation). Shows exactly how the resource is characterized.

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

Usage Guidelines5/5

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

Provides explicit when-to-use guidance embedded in the workflow: use who_search_indicators to find the code, optionally call who_get_indicator_metadata to confirm valid dimensions, then call this tool. Names concrete exclusions — spatial filters are mutually exclusive per call and mixing triggers an error; the sex filter only applies when SEX is the first cross-cutting dimension and returns empty rows otherwise. It even routes to who_list_dimension_values for valid codes. No agent needs to infer usage.

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.