Skip to main content
Glama

Get Population

get_population
Read-onlyIdempotent

Fetch annual total population (SP.POP.TOTL) for a country from the World Bank, defaulting to 2015-2024. Returns a year-by-year array of values. Shortcut for get_indicator.

Example tool call

This call uses example arguments supplied in the tool’s input schema.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "country_code": "BR"
    },
    "name": "get_population"
  }
}

Input Schema

NameRequiredDescriptionDefault
country_codeYesISO country code (e.g., "US", "GBR", "CN")

Output Schema

NameRequiredDescriptionDefault
dataYesTime-series population data sorted by year descending
countryYesCountry name or code
country_idYesWorld Bank country ID
date_rangeYesRequested date range in start:end format
indicator_idYesWorld Bank indicator code
last_updatedYesLast update timestamp from World Bank API
total_recordsYesTotal number of records available
indicator_nameYesFull indicator name/description

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "country": {
      +      "description": "Country name or code",
      +      "type": "string"
      +    },
      +    "country_id": {
      +      "description": "World Bank country ID",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "data": {
      +      "description": "Time-series population data sorted by year descending",
      +      "items": {
      +        "properties": {
      +          "value": {
      +            "description": "Total population value for the year",
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "year": {
      +            "description": "Year of the observation",
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "date_range": {
      +      "description": "Requested date range in start:end format",
      +      "type": "string"
      +    },
      +    "indicator_id": {
      +      "description": "World Bank indicator code",
      +      "type": "string"
      +    },
      +    "indicator_name": {
      +      "description": "Full indicator name/description",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "last_updated": {
      +      "description": "Last update timestamp from World Bank API",
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "total_records": {
      +      "description": "Total number of records available",
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "country",
      +    "country_id",
      +    "indicator_id",
      +    "indicator_name",
      +    "date_range",
      +    "total_records",
      +    "last_updated",
      +    "data"
      +  ],
      +  "type": "object"
      +}
  2. Changed1 schema field changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "country_code": "BR"
      +  }
      +]
  3. First observed

TDQS

A4.2/5.0
Behavior4/5

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

Annotations already declare readOnlyHint, idempotentHint, non-destructive, and openWorldHint, so the safety profile is largely covered. The description adds genuinely useful behavior: the default 2015-2024 window and that the result is a year-by-year array, which tells the agent what shape of data to expect. It does not address empty/error behavior for invalid country codes or whether the range can be overridden.

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 short sentences, front-loaded with the verb, resource, and indicator code, then the default range, then return shape and sibling relationship. Every clause carries information and nothing is padding.

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

Completeness4/5

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

With an output schema present and annotations plus a fully documented parameter, the description covers what an agent needs to invoke the tool correctly. The only soft spot is the unexplained 'defaulting to' phrasing given there is no range parameter, which could leave an agent hunting for an option that does not exist.

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% and the single parameter is documented with ISO code examples, so the baseline is 3. The description adds no meaning beyond the schema for country_code (e.g., whether subdivisions or aggregates like 'WLD' are accepted), and the phrase 'defaulting to 2015-2024' implies a range control that no parameter actually exposes.

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 (fetch), resource (annual total population), official indicator code (SP.POP.TOTL), source (World Bank), and default scope (2015-2024). It also positions itself against siblings by calling itself a 'shortcut for get_indicator', so an agent can distinguish it from get_gdp or the generic indicator tool without reading schemas.

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?

The description gives clear context for use: per-country population figures with a stated default year range, which is enough for an agent to know when this is the right pick. It implies that other indicators belong to get_indicator via the 'shortcut' framing, but it does not explicitly state when not to use this tool (e.g., for multi-country comparisons, where compare_countries might fit).

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.