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. Discover positional filters from returned dim1Type/dim1, dim2Type/dim2 and dim3Type/dim3 pairs; metadata alone does not identify a slot. 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

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.
dim2_valueNoValue filter for the second cross-cutting dimension, e.g. AGEGROUP_DAYS0-27. Discover the position from returned dim2Type/dim2 pairs; metadata does not identify the slot. Empty strings are ignored with a notice.
dim3_valueNoValue filter for the third cross-cutting dimension, e.g. CHILDCAUSE_CH9. Discover the position from returned dim3Type/dim3 pairs; metadata does not identify the slot. Empty strings are ignored with a notice.
region_codesNoWHO region codes to filter on, e.g. ["AFR","EUR","AMR","EMR","SEAR","WPR"]. Returns the aggregate row for each named WHO region. 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 WHO country codes, 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_codesNoWHO country codes to filter on, e.g. ["JPN","USA","BRA"], including historical codes such as ME1 and SDN736. Discover codes with who_list_dimension_values dimension="COUNTRY". 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

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. Changed9 schema fields changed
    • changedInput schema / properties / country_codes / description
      Previous value: -"ISO 3166-1 alpha-3 country codes to filter on, e.g. [\"JPN\",\"USA\",\"BRA\"]. Mutually exclusive with region_codes and income_group_codes."New value: +"WHO country codes to filter on, e.g. [\"JPN\",\"USA\",\"BRA\"], including historical codes such as ME1 and SDN736. Discover codes with who_list_dimension_values dimension=\"COUNTRY\". Mutually exclusive with region_codes and income_group_codes."
    • addedInput schema / properties / dim2_value
      Added value: +{
      +  "description": "Value filter for the second cross-cutting dimension, e.g. AGEGROUP_DAYS0-27. Discover the position from returned dim2Type/dim2 pairs; metadata does not identify the slot. Empty strings are ignored with a notice.",
      +  "type": "string"
      +}
    • addedInput schema / properties / dim3_value
      Added value: +{
      +  "description": "Value filter for the third cross-cutting dimension, e.g. CHILDCAUSE_CH9. Discover the position from returned dim3Type/dim3 pairs; metadata does not identify the slot. Empty strings are ignored with a notice.",
      +  "type": "string"
      +}
    • removedInput schema / properties / limit / maximum
      Removed value: -1000
    • 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 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."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. 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 WHO country codes, 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 / appliedFilters / properties / dim2Value
      Added value: +{
      +  "description": "dim2_value filter applied, if any.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / appliedFilters / properties / dim3Value
      Added value: +{
      +  "description": "dim3_value filter applied, if any.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / rows / items / properties / dim3
      Added value: +{
      +  "description": "Third cross-cutting dimension value.",
      +  "type": "string"
      +}
    • addedOutput schema / properties / rows / items / properties / dim3Type
      Added value: +{
      +  "description": "Third cross-cutting dimension type, e.g. CHILDCAUSE.",
      +  "type": "string"
      +}
  2. 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"
      -]
  3. 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"
      -}
  4. 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"
      +]
  5. 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"
      +]
  6. 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"
      +]
  7. 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"
      +]
  8. First observed

TDQS

A4.8/5.0
Behavior5/5

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

Annotations already cover read-only/idempotent/closed-world, and the description adds real behavioral context beyond them: mixing spatial filters triggers an error, omitting all spatial filters returns all geographies and may be large, the sex filter can silently return empty rows, offset beyond totalRows returns an empty array rather than an error, and row order is deterministic so capped results are a defined slice. This is exactly the kind of edge-case disclosure annotations cannot convey.

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?

Front-loaded with purpose, then workflow, then constraint warnings, then pagination. It is dense but multi-sentence and slightly long, with a couple of points that overlap the schema's own parameter descriptions, though nothing is wasted filler.

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?

With 14 parameters, an output schema, and full annotations, this description covers what an agent needs: entry workflow, filter-conflict rules, empty-result traps, determinism and paging semantics. Return values are only summarized as needed because an output schema exists.

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 is 3. The description still adds value beyond the schema by explaining cross-parameter interactions: the effect of providing no spatial filter, the conditional applicability of the sex filter, and the need to discover dim slot positions from returned dim pairs rather than metadata. Remaining specifics (limit max, enum meanings) are left to the schema, which is appropriate.

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 (query data rows) and resource (single WHO GHO indicator) with scope qualifiers. It explicitly positions itself as 'the primary data-fetching tool in the find-then-query workflow', which cleanly separates it from the sibling search, metadata, and dimension-listing tools.

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?

Gives an explicit ordered workflow (who_search_indicators -> who_get_indicator_metadata -> this tool), states exclusions (spatial filter family is mutually exclusive), and warns when the sex filter returns empty rows plus how to verify first. Alternatives and preconditions are named, not inferred.

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.