Skip to main content
Glama

lookup_cities

Read-onlyIdempotent

Find IATA codes for cities by name or code for use in flight searches. Use when a flight tool requires a city's airport code.

Instructions

Look up cities by name or IATA code and return the code flight tools expect.

Use when the user names a city and a flight search needs its IATA code. For an airport code use lookup_airports; for the nearest airport to a place that is not itself a city, use find_nearest_airports.

Every flight tool takes IATA codes, so this is usually the first call when the user names a place. The full dataset is ~9.6k cities, so always pass search. Names are only available in the requested locale: searching "Мюнхен" needs locale="ru".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
limitNoMax results to return (1-500, default 50).
localeNo2-letter locale for names (e.g. "en", "ru"). Defaults to the server's locale.
searchNoCity name substring or exact IATA code (e.g. "bangkok", "BKK").

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Schema Changelog

Changes observed during successful MCP inspections.

  1. First observedv0.5.3

TDQS

A4.7/5.0
Behavior4/5

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

Annotations already declare readOnly, idempotent, openWorld and non-destructive, so the safety profile is covered. The description adds genuinely new behavioral context: the ~9.6k city dataset means search must always be supplied, and names are locale-bound ('searching "Мюнхен" needs locale="ru"'), which is a real failure mode an agent would otherwise hit.

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?

Front-loads the purpose, then routes to alternatives, then closes with the two operational constraints. Every sentence carries information; nothing is restated from the schema or annotations.

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?

An output schema exists, so return values need no explanation. Combined with full annotation coverage and complete parameter descriptions, the description supplies exactly the missing pieces: sibling routing, dataset scale, and locale-dependent matching.

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, but the description adds meaning beyond the schema: it explains why `search` should always be passed and that `locale` gates which name spellings will match. `limit` is left to the schema, which documents it fully, so no gap remains.

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 (look up) and resource (cities) plus the output contract: the IATA code flight tools expect. It explicitly distinguishes itself from lookup_airports and find_nearest_airports by name, so an agent can route correctly without opening a schema.

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 when-to-use condition ('when the user names a city and a flight search needs its IATA code'), names two sibling alternatives with the conditions that select them ('for an airport code use lookup_airports', 'for the nearest airport to a place that is not itself a city, use find_nearest_airports'), and adds the imperative 'always pass search'.

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