Skip to main content
Glama

Search hotels

eg_search
Read-onlyIdempotent

Search hotels in a city by dates, guests, price, stars, and facilities; returns available options with nightly and stay total prices to compare and select a stay.

Instructions

Search hotels in a city for given dates and filters; returns cards with the lowest price.

price_from is the lowest room price per night in Toman (often a single bed; stay_total is the whole stay); pass guests for a room that sleeps them. status: available, min_stay (stay rules may not fit) or sold_out. Next: eg_rooms, eg_hotel or eg_reviews with a card's hotel value.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "city": "<city>"
    },
    "name": "eg_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
areaNoCity category, Persian, e.g. 'حرم', 'ارزان', 'لوکس'; must match one.
bedsNoRoom bed count.
cityYesSlug from eg_cities (Mashhad) or Persian name.
kindNostay = villas, suites, houses.hotel
nameNoName part, Persian.
sortNoOne of popular, price_asc, price_desc, rating, discount, reviews.popular
typeNoProperty type: hotel, apartment_hotel, traveler_house, inn, traditional_residence, residential_unit, ecotourism_resorts.
boardNoMeal plan.
limitNo
guestsNoAdds `price_for_guests` (cheapest room for this many, per night) to the first 12 cards.
nightsNoNumber of nights, 1-30.
check_inNoYYYY-MM-DD, Gregorian or Jalali (1405-08-19). Default tomorrow.
max_priceNoToman per night.
max_starsNo
min_priceNoToman per night.
min_starsNo
facilitiesNoPersian, all required, e.g. ['استخر', 'پارکینگ'].
attraction_idNoId from eg_attractions.
include_sold_outNoList sold-out hotels too.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv0.2.0
    • changedInput schema / properties / area / description
      Previous value: -"A city category in Persian, e.g. 'حرم' (near the shrine), 'ارزان' (cheap), 'لوکس'; must match one."New value: +"City category, Persian, e.g. 'حرم', 'ارزان', 'لوکس'; must match one."
    • changedInput schema / properties / attraction_id / description
      Previous value: -"Only hotels the site lists near this attraction (id from eg_attractions)."New value: +"Id from eg_attractions."
    • changedInput schema / properties / beds / description
      Previous value: -"Only hotels with a room of this many beds."New value: +"Room bed count."
    • changedInput schema / properties / board / description
      Previous value: -"Only hotels with this meal plan: room_only, bed_and_breakfast, half_board, full_board."New value: +"Meal plan."
    • changedInput schema / properties / check_in / description
      Previous value: -"Check-in date, YYYY-MM-DD (Gregorian, or Jalali such as 1405-08-19). Default: tomorrow."New value: +"YYYY-MM-DD, Gregorian or Jalali (1405-08-19). Default tomorrow."
    • changedInput schema / properties / city / description
      Previous value: -"City slug from eg_cities (Mashhad, Esfahan, Kish...) or its Persian name."New value: +"Slug from eg_cities (Mashhad) or Persian name."
    • changedInput schema / properties / facilities / description
      Previous value: -"Facilities the hotel must all have, Persian, e.g. ['استخر', 'پارکینگ'] (pool, parking)."New value: +"Persian, all required, e.g. ['استخر', 'پارکینگ']."
    • changedInput schema / properties / guests / description
      Previous value: -"Add `price_for_guests`: the cheapest room that sleeps this many, per night, for the first 12 cards."New value: +"Adds `price_for_guests` (cheapest room for this many, per night) to the first 12 cards."
    • changedInput schema / properties / include_sold_out / description
      Previous value: -"Also list hotels with no room for those dates."New value: +"List sold-out hotels too."
    • changedInput schema / properties / kind / description
      Previous value: -"hotel = hotels and hotel apartments; stay = villas, suites, houses."New value: +"stay = villas, suites, houses."
    • changedInput schema / properties / max_price / description
      Previous value: -"Highest 'price from' in Toman, per night."New value: +"Toman per night."
    • changedInput schema / properties / min_price / description
      Previous value: -"Lowest 'price from' in Toman, per night."New value: +"Toman per night."
    • changedInput schema / properties / name / description
      Previous value: -"Part of the hotel name, Persian."New value: +"Name part, Persian."
    • changedInput schema / properties / sort / description
      Previous value: -"One of popular, price_asc, price_desc, rating, discount, reviews. popular is the site's default order."New value: +"One of popular, price_asc, price_desc, rating, discount, reviews."
  2. First observedv0.1.1

TDQS

A4.5/5.0
Behavior5/5

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

Annotations already cover the safety profile (readOnly, idempotent, openWorld, non-destructive), and the description goes well beyond them: it explains that `price_from` is a per-night lowest room price often for a single bed while `stay_total` covers the whole stay, that `guests` only enriches the first 12 cards with `price_for_guests`, and that `status` distinguishes available / min_stay / sold_out. These are exactly the interpretive details an agent needs to avoid misreading results.

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?

Three compact sentences: purpose and return first, then the two ambiguous price fields, then the status enum, then next-step routing. Backticks mark field names and nothing is repeated from the schema, so every sentence earns its place.

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?

With 19 parameters and no output schema, the description carries the burden of explaining the returned card, and it does so for the fields most likely to be misread (`price_from`, `stay_total`, `status`). Combined with the follow-up tool routing, an agent has enough to call it and interpret results without further guessing.

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 84%, so the schema already documents nearly every parameter including enums, defaults and units. The description reinforces `guests` and pricing semantics but adds little parameter-level detail the schema does not already carry, 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 ('Search hotels in a city for given dates and filters') plus the return shape ('cards with the lowest price'). The closing 'Next: eg_rooms, eg_hotel or eg_reviews with a card's `hotel` value' positions it as the discovery entry point relative to its siblings, so an agent can distinguish it from eg_hotel without opening schemas.

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 flow guidance is explicit about what to do after this call (hand a card's `hotel` value to eg_rooms/eg_hotel/eg_reviews), which is real routing advice. It never states when NOT to use it or when eg_similar/eg_deals would be the better starting point, so exclusions are missing.

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