Skip to main content
Glama
nanwer
by nanwer

search_stays

Search available hotels and vacation rentals by city, dates, and party size. Returns ranked results with prices, ratings, amenities, and booking links.

Instructions

๐ŸŽฏ RENDERING DIRECTIVE โ€” READ FIRST. When this tool returns 2+ stay offers, you MUST present them as an interactive HTML/React artifact (Artifacts block, not flowing prose). Each stay is a visually distinct CARD with a prominent "Book on Google Hotels" button styled as an HTML button, NOT an inline markdown hyperlink. Plain prose with [text](url) links is NOT acceptable for multi-result responses โ€” the user can't click a paragraph. If this call is part of a larger trip-plan response, the trip plan ITSELF should be an artifact containing the stay cards. Single-result responses may use prose.

Search Google's hotel AND vacation rental listings for a city, date range, and party size, returning a ranked unified list of available places to stay.

Returns ranked stay offers โ€” each with name, photos, star rating (hotels only), review score, price (per-night and total), top amenities, GPS coordinates, a category badge ("hotel" or "vacation_rental"), per-property OTA price comparison via sources, and a Google Hotels deep link. Does NOT book โ€” the booking_url opens the specific property's Google Hotels entity page with the user's check-in/check-out pre-filled, where they can click through to a booking partner.

category selector:

  • "all" (default) โ€” fans out to TWO SerpAPI calls in parallel: one for hotels, one for vacation rentals. Merges, dedupes, sorts. Latency is ~3s (parallel, not summed). Costs 2 SerpAPI calls instead of 1 per query โ€” burns SERPAPI quota twice as fast.

  • "hotels" โ€” only hotel-class properties. One SerpAPI call.

  • "vacation_rentals" โ€” only short-term rentals via SerpAPI's aggregation. Surfaces OTAs (Booking.com, Hotels.com, Bluepillow.com, Vrbo.com when available). Airbnb is NOT in Google's aggregation โ€” use category="airbnb" for that.

  • "airbnb" โ€” bypasses SerpAPI entirely and queries Airbnb directly (via the pyairbnb library). Use this when the user specifically asks for "Airbnb" / "AirBNB" / "stuff on Airbnb". Costs NO SerpAPI quota but is slower and more fragile (Airbnb may block scraping during high traffic). Filter parameters supported: min_bedrooms, min_bathrooms, min_review_score, max_price_per_night. min_rating is ignored (Airbnb listings have no hotel-class star rating).

sources is a per-offer list of (name, price_per_night) entries showing the same property listed across different booking partners. Empty list for hotels in the current data (SerpAPI doesn't surface partner prices for hotels in our queries). Populated for vacation rentals.

Prices come back in EUR by default (matches the flights tool's typical response currency for European-IP users). Pass currency (ISO 4217, e.g. "USD", "JPY", "GBP") to override per call. The currency field on each offer reflects what was actually requested.

Filter scoping (important โ€” the wrong filter on the wrong category is silently dropped):

  • min_rating (1-5 stars) applies only to hotels. When category="all", it filters the hotel side; vacation rentals pass through unfiltered (they have no hotel class).

  • min_bedrooms and min_bathrooms apply only to vacation rentals. Filter the rental side; hotels pass through.

  • min_review_score, max_price_per_night, required_amenities, sort_by, max_results, currency apply uniformly.

address is always null on offers โ€” SerpAPI's google_hotels list endpoint doesn't carry per-property addresses. Use latitude/longitude for location.

The review score is Google's native 0-5 scale (e.g., 4.6 / 5), NOT a 0-10 scale.

sort_by accepts: BEST (preserve SerpAPI's returned order; for the merged path this falls back to price-ascending as the tie-breaker since neither response has a globally meaningful rank), PRICE_LOW, PRICE_HIGH, RATING (star rating descending; hotels-only signal), REVIEW_SCORE (review_score descending, review_count tie-break).

PRE-CALL ELICITATION: Before calling this tool, confirm with the user:

  • Type of stay (category): default to "all" unless the user signals otherwise. "Find me a place to stay in Lisbon" stays at "all". "Find me a nice hotel in Lisbon" โ†’ "hotels". "Find me a rental in Lisbon" โ†’ "vacation_rentals". "Find me an Airbnb in Lisbon" โ†’ "airbnb" (this hits Airbnb directly; SerpAPI doesn't include Airbnb listings).

  • Location: specific city or neighborhood โ€” "Tampere" works, "Notting Hill, London" works, "somewhere in Europe" does not. Ask if vague.

  • Check-in and check-out dates: both required and check_out must be strictly after check_in. Confirm UTC-today or later.

  • Party size: adults, children, and number of rooms. Default is 2 adults / 0 children / 1 room โ€” don't assume; ask if not stated.

  • Budget: any per-night ceiling? If the user said "cheap" or "affordable", ask for a concrete number to set max_price_per_night.

  • Must-have amenities: wifi, breakfast, parking, gym, pool, pet-friendly? Don't assume; ask.

  • Star rating or review score floor: "at least 4 stars", "well-reviewed (8+)"? Map to min_rating or min_review_score (remember review_score is 0-5, so "8+" should become min_review_score=4.0 or you should ask for clarification).

  • Rental size: if the user mentioned bedrooms or bathrooms ("a 2-bedroom apartment"), set min_bedrooms / min_bathrooms. These constrain the vacation-rental side only.

  • Sort priority: cheapest first, highest-rated, best location? Map to sort_by.

  • Currency: infer from the user's stated location or budget. "I'm in Tokyo, budget ยฅ30000/night" โ†’ currency="JPY", max_price_per_night=30000. "$200/night in NYC" โ†’ currency="USD". Default "EUR" if the user gives no signal. Always pass the currency that matches the units the user spoke in for max_price_per_night โ€” mixing currencies silently corrupts the budget filter.

RESULT PRESENTATION: When returning 2+ stays, render them as an interactive artifact with one card per offer. Each card shows:

  • The stay name, prominent and large at the top of the card (it carries the card's visual hierarchy in the absence of a photo).

  • A small category badge at the top: Hotel or Vacation rental, taken from the category field.

  • Star rating (hotels only โ€” render as filled stars if you can) and review_score with review_count: "4.6 / 5 (686 reviews)".

  • For vacation rentals, surface bedrooms / bathrooms / sleeps inline if present (e.g. "2 BR ยท 2 BA ยท sleeps 6").

  • Price per night with the total alongside in smaller text, in the response currency.

  • For offers with a non-empty sources array, show "from โ‚ฌX on [cheapest source]" with a smaller "also on [other sources]" note when 2+ sources are present.

  • Top 3-4 amenities pulled from the amenities list.

  • Short description if present (hotels only โ€” rentals leave this null and surface essential_info via the bedrooms/bathrooms/sleeps fields above).

  • A "Book on Google Hotels" button linking to booking_url, opening in a new tab.

Do NOT render the images field as photo elements. Hotel image CDNs (Google's signed gps-cs-s URLs, hotelbeds, trvl-media, bstatic, giata) use hotlink protection that breaks these URLs outside their intended hosts; broken images degrade the card more than missing photos. The images field stays on the response model for future use (e.g., a server-side image proxy layer), but card rendering should be text-only. Compensate for the missing visual hierarchy by making the stay name larger and prominent at the top of each card.

If the response has a non-empty warnings array, surface them verbatim above the cards (e.g., "Note: vacation rental data was unavailable for this query; showing hotels only."). Do NOT silently swallow them.

Sort cards by the same sort_by the user requested. For a single result, prose is fine.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
roomsNo
adultsNo
sort_byNoBEST
categoryNoall
childrenNo
currencyNoEUR
locationYes
min_ratingNo
max_resultsNo
min_bedroomsNo
check_in_dateYes
min_bathroomsNo
check_out_dateYes
min_review_scoreNo
required_amenitiesNo
max_price_per_nightNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

Since no annotations are provided, the description carries the full burden of disclosing behavioral traits. It extensively covers: use of SerpAPI with parallel calls for 'all' category (~3s latency, 2x quota cost), airbnb category being slower and more fragile, default currency (EUR), filter scoping (min_rating only hotels, etc.), address always null, review scale 0-5, sort_by options, rendering requirements (artifact with cards, no images due to hotlink protection), and warnings handling. No contradictions are present.

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

Conciseness3/5

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

The description is very long and verbose, containing extensive sections on pre-call elicitation and result presentation that could be abbreviated or separated. While well-organized (rendering directive first, then purpose, parameters, usage context), its length may overwhelm quick parsing. Not every sentence is essential; some repetition occurs (e.g., category descriptions appear in multiple places). Conciseness is moderately compromised.

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?

Given the tool's complexity (16 parameters, 4 categories, filter scoping, rendering rules, output schema exists), the description is exceptionally complete. It covers input semantics, behavioral traits, output form, rendering directives, pre-call elicitation, and warning handling. The presence of an output schema reduces the need to describe return values. Sibling differentiation is clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The schema has 0% description coverage, so the description must fully document parameters. It does so comprehensively: explains each category value, sort_by options, filter applicability (min_rating for hotels, min_bedrooms/min_bathrooms for rentals), currency override, and max_price_per_night. It also clarifies that 'address is always null', 'review_score is 0-5', and provides conversion guidance. All 16 parameters are effectively covered.

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 the tool's function: 'Search Google's hotel AND vacation rental listings for a city, date range, and party size, returning a ranked unified list of available places to stay.' It explicitly distinguishes itself from siblings like search_flights and get_stay_details by specifying it searches for stays across hotels and vacation rentals, and it does not book reservations.

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 provides detailed guidance on when to use this tool, including a 'PRE-CALL ELICITATION' section that instructs the agent to confirm parameters like category, location, dates, etc., with the user. It differentiates between categories (all, hotels, vacation_rentals, airbnb) and specifies when each is appropriate. However, it does not explicitly mention that get_stay_details should be used for more details on a specific property, which would strengthen usage guidance.

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/nanwer/trip-search-mcp'

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