Skip to main content
Glama
sholts2026

flexible-hotels-mcp-server

by sholts2026

Resolve City Name to IATA City Code

flexible_hotels_resolve_city_code
Read-onlyIdempotent

Convert a city name to its 3-letter IATA code for hotel searches. Provide a city keyword like 'Tel Aviv' to get the required city code.

Instructions

Look up the 3-letter IATA city code for a free-text city name (e.g. "Tel Aviv" -> "TLV", "Paris" -> "PAR").

Every other tool in this server (list_hotels_in_city, search_flexible_hotel_offers) requires an IATA city_code, so this is normally the first tool to call when the user names a city.

Args:

  • keyword (string): city name or the start of it, e.g. "Tel Aviv", "New York", "Par"

  • max_results (number): max cities to return, 1-20 (default 10)

  • response_format ('markdown' | 'json'): output format (default markdown)

Returns: matching cities with their name, iataCode, and country code.

Examples:

  • Use when: "find flexible hotel deals in Tel Aviv" -> call with keyword="Tel Aviv" first to get city_code="TLV"

  • Don't use when: you already have a 3-letter IATA city code

Error Handling:

  • Returns "No cities found matching ..." if the keyword doesn't match anything

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
keywordYesFree-text city name or the start of it, e.g. 'Tel Aviv', 'Par', 'New York'
max_resultsNoMaximum cities to return
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown
Behavior5/5

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

Annotations already declare readOnlyHint=true, idempotentHint=true, and destructiveHint=false. The description adds beyond these by specifying the return format (name, iataCode, country code), the exact error message ('No cities found matching ...'), and clarifies it is a pure lookup with no side effects. No contradiction with annotations.

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 well-structured and front-loaded with purpose and usage context. It includes a clear one-liner, a brief explanation of why it's used first, parameter descriptions (somewhat redundant with schema), returns, examples, and error handling. It is slightly lengthy due to repeating the Args section, but every section earns its place and the structure aids comprehension.

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?

For a simple lookup tool with three parameters, no output schema, and strong annotation coverage, this description covers all necessary aspects: purpose, when to use, examples, return format, and error handling. An agent can invoke it correctly without ambiguity, making it complete for its complexity.

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% with all three parameters fully documented. The tool description repeats parameter details (e.g., max_results range and default, response_format enum) but adds no new semantic meaning beyond what the schema already provides. It reinforces usage examples but does not introduce additional information, 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?

The description states a specific action and resource: 'Look up the 3-letter IATA city code for a free-text city name,' with concrete examples (Tel Aviv -> TLV, Paris -> PAR). It clearly distinguishes itself from sibling tools by explaining that all other tools require an IATA city_code, making this the prerequisite lookup tool.

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?

Explicitly states when to use it ('normally the first tool to call when the user names a city') and when not to use it ('Don't use when: you already have a 3-letter IATA city code'). It names dependent tools (list_hotels_in_city, search_flexible_hotel_offers) and provides a concrete example of usage context.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/sholts2026/flexible-hotels-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server