Skip to main content
Glama
sholts2026

flexible-hotels-mcp-server

by sholts2026

Search Hotel Offers by Number of Nights (Flexible Dates)

flexible_hotels_search_flexible_offers
Read-only

Search hotel prices for a fixed number of nights across any check-in dates in a window, returning the cheapest offers with booking links.

Instructions

Find the cheapest hotel offers for a fixed NUMBER OF NIGHTS across a WINDOW of possible check-in dates, instead of a single fixed check-in/check-out date pair. This is the core tool of this server.

For example: "3 nights in Tel Aviv, sometime between Sep 1 and Sep 20" is expressed as nights=3, earliest_check_in="2026-09-01", latest_check_in="2026-09-20". The tool scans every possible check-in date in that window (each implying checkout = check-in + nights), fetches real priced offers for each, and returns the cheapest options found, sorted by price — so the caller can see which exact dates are the best deal.

This does NOT search by a single fixed date — for that, just set earliest_check_in = latest_check_in. This is an AFFILIATE search tool: it never collects payment details or creates a booking. Each returned offer includes a bookingUrl — a link to the real hotel/OTA listing where the guest can complete the purchase themselves, if they choose to. Data comes from the Amadeus for Developers hotel API (free test/sandbox environment by default).

Args:

  • city_code (string): 3-letter IATA city code, e.g. "TLV" (use resolve_city_code to find it from a name)

  • nights (number): exact stay length in nights, 1-28

  • earliest_check_in / latest_check_in (YYYY-MM-DD): the flexible window of possible check-in dates, at most 30 days apart

  • hotel_ids (string[], optional): restrict to specific Amadeus hotelIds (from list_hotels_in_city)

  • max_hotels (number): if hotel_ids is omitted, how many hotels in the city to auto-check (default 15)

  • adults (number): guests per room (default 2)

  • room_quantity (number): rooms to book (default 1)

  • currency (string, optional): 3-letter ISO currency code, e.g. "USD"

  • max_results (number): how many offers to return, cheapest first (default 10)

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

Returns: For JSON format: { "cityCode": string, "nights": number, "earliestCheckIn": string, "latestCheckIn": string, "datesScanned": number, "datesWithOffers": number, "datesSkipped": [{ "date": string, "reason": string }], "hotelsConsidered": number, "offers": [{ "offerId", "hotelId", "hotelName", "checkInDate", "checkOutDate", "nights", "currency", "totalPrice", "boardType", "roomDescription", "bookingUrl" }, ...], "cheapest": <same shape as one offer, or null>, "truncated": boolean }

Examples:

  • Use when: "find me the cheapest 3-night stay in Paris sometime in the next month"

  • Use when: "is it cheaper to go for a long weekend early or late September?"

  • Don't use when: the user already has exact fixed dates in mind — a single-date search is faster (set earliest_check_in = latest_check_in), though this tool still works for that case.

Error Handling:

  • Returns an error if the date window exceeds 30 days — narrow it and retry

  • Individual dates that error out (e.g. sandbox has no data) are listed in datesSkipped rather than failing the whole search

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
adultsNoNumber of adult guests per room
nightsYesExact number of consecutive nights the guest wants to stay, e.g. 3
currencyNoOptional 3-letter ISO currency code to request prices in, e.g. 'USD', 'EUR', 'ILS'
city_codeYesIATA city code to search in, e.g. 'TLV' for Tel Aviv (use resolve_city_code to find it from a name)
hotel_idsNoOptional list of specific Amadeus hotelIds to restrict the search to (from list_hotels_in_city). If omitted, the tool automatically looks up hotels in city_code and checks up to max_hotels of them.
max_hotelsNoWhen hotel_ids is not provided, how many hotels in the city to check (higher = more thorough but slower, capped at 30)
max_resultsNoMaximum number of offers to return, sorted cheapest first
room_quantityNoNumber of rooms to book
latest_check_inYesLatest allowed check-in date, YYYY-MM-DD. Must be no more than 30 days after earliest_check_in.
response_formatNoOutput format: 'markdown' for human-readable or 'json' for machine-readablemarkdown
earliest_check_inYesEarliest allowed check-in date, YYYY-MM-DD. The search scans every possible check-in date from this date through latest_check_in.
Behavior5/5

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

While annotations already declare readOnlyHint and destructiveHint=false, the description enriches the behavioral profile substantially. It discloses an affiliate-search model ('never collects payment details or creates a booking'), the external bookingUrl flow, the Amadeus sandbox data source, per-date error handling via datesSkipped, and the scanning of every check-in date. These details go well beyond the annotations and materially shape an agent's expectations for side effects and response quirks. No contradiction with annotations; readOnlyHint aligns with the stated no-booking behavior.

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?

The description is long but unusually well-organized. It front-loads the core concept and the key differentiator (flexible window vs fixed dates) in the opening sentences, then flows logically through an example, non-use cases, affiliate disclaimer, parameter list, return shape, usage examples, and error handling. Every section earns its place: the return JSON is especially valuable given the lack of an output schema, and the error-handling note covers edge cases an agent would otherwise discover only at runtime. No redundant filler; the length is justified by the tool's complexity.

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 an 11-parameter tool with no output schema, the description is exceptionally complete. It specifies the exact JSON return structure, including datesSkipped with reason fields and the cheapest summary object, which an agent needs to parse results reliably. It covers error conditions (window >30 days, per-date failures), explains the scanning algorithm, and provides two representative use cases. Combined with full schema parameter descriptions and annotations, nothing required to correctly invoke and interpret this tool is missing.

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 each parameter is already documented. The description adds value by explaining the conceptual relationship between earliest_check_in and latest_check_in as a 'window' with a worked example ('3 nights in Tel Aviv... is expressed as nights=3, earliest_check_in="2026-09-01", latest_check_in="2026-09-20"'), and by clarifying default behaviors (max_hotels auto-check, response_format selection). These additions go beyond simple schema repetition, though the marginal gain is modest since the schema descriptions already cover the same facts. A solid 4, not a 5 because the added insight is illustrative rather than essential.

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 opens with a precise statement: 'Find the cheapest hotel offers for a fixed NUMBER OF NIGHTS across a WINDOW of possible check-in dates.' It specifies the resource (hotel offers), the action (find cheapest), and the distinctive scope (flexible dates rather than fixed). It also explicitly positions itself as 'the core tool of this server' and contrasts with sibling tools such as list_hotels_in_city and resolve_city_code, making its role unmistakable. No ambiguity.

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?

Usage guidance is explicit and actionable. It provides concrete when-to-use examples ('find me the cheapest 3-night stay in Paris sometime in the next month') and a clear don't-use case ('Don't use when: the user already has exact fixed dates in mind'), followed by the recommended alternative (set earliest_check_in = latest_check_in). It also points to companion tools (resolve_city_code, list_hotels_in_city) for prerequisites, making routing between siblings trivial.

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