Skip to main content
Glama

Location and Timezone MCP Server by RoxyAPI

Get cities in a country - Geocoding directory sorted by population

get_location_countries_iso2
Read-only

Returns all cities for a specific country, identified by ISO 3166-1 alpha-2 code (e.g. DE for Germany, FR for France, GB for United Kingdom, US for United States). Each city includes geographic coordinates, IANA timezone, and DST-aware UTC offset for direct use in astrology birth chart, horoscope, transit, and panchang calculations. Cities sorted by population with the largest metropolitan areas first.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
iso2YesISO 3166-1 alpha-2 country code, case-insensitive. Common codes: DE (Germany), FR (France), GB (United Kingdom), US (United States), ES (Spain), IT (Italy), NL (Netherlands), IN (India), BR (Brazil), JP (Japan).
limitNoMaximum items to return per page. Range: 1-100, default 20.
offsetNoNumber of items to skip for pagination. Default 0.
compactNoSet true for the same data in a compact shape: arrays of same-shaped objects arrive columnar as {"__cols":[names],"__rows":[[values]]}. Lossless, typically 40 to 52 percent fewer tokens.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitYes
totalYes
citiesYes
offsetYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed2 schema fields changed
    • addedInput schema / properties / offset / default
      Added value: +0
    • addedInput schema / properties / offset / minimum
      Added value: +0
  2. Changed3 schema fields changed
    • removedInput schema / properties / offset / default
      Removed value: -0
    • removedInput schema / properties / offset / minimum
      Removed value: -0
    • changedInput schema / properties / offset / type
      Previous value: -[
      -  "integer",
      -  "null"
      -]New value: +"integer"
  3. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "cities": {
      +      "items": {
      +        "properties": {
      +          "city": {
      +            "type": "string"
      +          },
      +          "country": {
      +            "type": "string"
      +          },
      +          "iso2": {
      +            "type": "string"
      +          },
      +          "latitude": {
      +            "type": "number"
      +          },
      +          "longitude": {
      +            "type": "number"
      +          },
      +          "population": {
      +            "type": "number"
      +          },
      +          "province": {
      +            "type": "string"
      +          },
      +          "timezone": {
      +            "type": "string"
      +          },
      +          "utcOffset": {
      +            "type": "number"
      +          }
      +        },
      +        "required": [
      +          "city",
      +          "province",
      +          "country",
      +          "iso2",
      +          "latitude",
      +          "longitude",
      +          "timezone",
      +          "utcOffset",
      +          "population"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "limit": {
      +      "type": "number"
      +    },
      +    "offset": {
      +      "type": "number"
      +    },
      +    "total": {
      +      "type": "number"
      +    }
      +  },
      +  "required": [
      +    "total",
      +    "limit",
      +    "offset",
      +    "cities"
      +  ],
      +  "type": "object"
      +}
  4. Changed2 schema fields changed
    • addedInput schema / examples
      Added value: +[
      +  {
      +    "iso2": "DE"
      +  }
      +]
    • changedInput schema / properties / compact / description
      Previous value: -"Set true to receive the exact same data in a token-optimized shape that is cheaper for you to read: whitespace is stripped and every array of same-shaped objects is encoded columnar as {\"__cols\":[field names],\"__rows\":[[values]]}, so each field name is sent once instead of once per row. Fully lossless (no field or value is dropped or changed) and typically 40 to 52 percent fewer tokens on large results. Prefer true whenever token or inference cost matters. Default false returns standard indented JSON."New value: +"Set true for the same data in a compact shape: arrays of same-shaped objects arrive columnar as {\"__cols\":[names],\"__rows\":[[values]]}. Lossless, typically 40 to 52 percent fewer tokens."
  5. Changed1 schema field changed
    • changedInput schema / properties / offset / type
      Previous value: -"integer"New value: +[
      +  "integer",
      +  "null"
      +]
  6. Changed1 schema field changed
    • changedInput schema / properties / compact / description
      Previous value: -"Return the same data in a token-optimized compact shape (minified, with same-shaped arrays encoded columnar) to reduce LLM token cost. Lossless: no fields are dropped. Default false."New value: +"Set true to receive the exact same data in a token-optimized shape that is cheaper for you to read: whitespace is stripped and every array of same-shaped objects is encoded columnar as {\"__cols\":[field names],\"__rows\":[[values]]}, so each field name is sent once instead of once per row. Fully lossless (no field or value is dropped or changed) and typically 40 to 52 percent fewer tokens on large results. Prefer true whenever token or inference cost matters. Default false returns standard indented JSON."
  7. Changed1 schema field changed
    • addedInput schema / properties / compact
      Added value: +{
      +  "default": false,
      +  "description": "Return the same data in a token-optimized compact shape (minified, with same-shaped arrays encoded columnar) to reduce LLM token cost. Lossless: no fields are dropped. Default false.",
      +  "type": "boolean"
      +}
  8. First observed

TDQS

A4.1/5.0
Behavior4/5

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

With readOnlyHint=true and destructiveHint=false already in annotations, the description adds valuable context: it details the data included (coordinates, timezone, offsets) and the population-based sorting. This goes beyond the safety annotations without contradicting them.

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 description is compact, front-loaded with the core purpose, and includes practical examples and context. The mention of specific use cases (astrology, horoscope) is slightly extraneous but does not bloat the content significantly.

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?

Given the output schema exists and annotations cover safety, the description is complete enough: it explains what the data is, how it is sorted, and why it might be used. Pagination details are left to the schema, which is appropriate.

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 the schema fully documents iso2, limit, offset, and compact. The description adds no parameter-specific meaning beyond what the schema already provides, which meets the baseline for high-coverage schemas but does not exceed it.

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 a specific verb ('Returns all cities') and resource ('for a specific country, identified by ISO 3166-1 alpha-2 code'), which distinguishes it from sibling tools like get_location_countries (presumably country list) and get_location_search (general search). The inclusion of example codes further disambiguates the exact input.

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 specifies the context (cities by country for astrology calculations) and the sorting behavior, which implies when to use it. However, it does not explicitly mention alternative tools or exclusion conditions, so it stops short of full when/when-not guidance.

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