Skip to main content
Glama

List cities

get_data_cities
Read-onlyIdempotent

Retrieve all cities in a country by ISO-2 code to populate city dropdowns, location filters, and autocomplete forms.

Instructions

Overview

Get a list of all cities within a specific country. Perfect for building location dropdowns and city selection interfaces.

When to Use

  • City dropdowns - Populate city selection lists

  • Location filters - Filter hotels by city

  • Geographic data - Get city lists for specific countries

  • Form autocomplete - Build city autocomplete features

What You Get

  • City list - All cities in the specified country

  • City names - Formatted city names ready for display

Quick Start

Provide the countryCode in ISO-2 format (e.g., "US", "GB"). Returns all cities in that country. Use the Get Country List endpoint to get country codes.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
timeoutNorequest timeout in seconds
countryCodeYesCountry code in iso-2 format (example: SG)

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.1.0

TDQS

A3.7/5.0
Behavior3/5

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

Annotations already declare readOnlyHint, idempotentHint, openWorldHint and destructiveHint=false, so the safety profile is covered. The description adds that the call returns the complete, unpaginated city list and requires an ISO-2 code, but says nothing about error behavior for invalid codes or response size limits.

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

Conciseness2/5

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

A four-section markdown document with redundant bullets ('city dropdowns', 'location filters', 'autocomplete' all describe the same one-line lookup) is disproportionate for a single-parameter read tool. The front-loaded overview is good, but most of the structure is boilerplate rather than information.

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?

For a trivial lookup with 100% schema coverage, present annotations and no output schema, the description supplies what an agent needs: the input format, the prerequisite endpoint, and the shape of the result. Only failure-mode and volume details are missing.

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 coverage is 100%, so both parameters (countryCode, timeout) are already documented with the ISO-2 format and an example. The description restates the same format requirement without adding syntax or edge-case detail, so the baseline of 3 applies.

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 and resource ('Get a list of all cities within a specific country') and bounds the scope to a single country, which distinguishes it from siblings such as get_data_countries and get_data_hotels. An agent can identify the operation without opening the schema.

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 'When to Use' section gives concrete contexts (dropdowns, location filters, autocomplete) and the Quick Start supplies the prerequisite chain: obtain the ISO-2 code from the country-list endpoint first. It lacks explicit when-not guidance, but the intended usage is unambiguous.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.