# search_stays

Finds stays for a destination, with optional dates and guests. With dates it also reports availability and, when available, a starting price.

## When to use it

- The user names a place and wants somewhere to stay.
- You need a `placeId` for [`get_stay`](https://mcp.nsuna.com/docs/tools/get-stay.md).
- You need a link that opens a stay on Nsuna with the user’s dates and guests (`customerUrl`).

## Inputs

| Parameter | Type | Required | Notes |
| --- | --- | --- | --- |
| `destination` | string | no | 2–200 characters. Destination text, such as Tallinn or Cape Town. Required unless destinationId and destinationType are both supplied. |
| `destinationId` | string | no | 1–256 characters. Pattern `^[^\s\x00-\x1f\x7f]+$`. Suggestion ID from a previous search_stays result. Supply with destinationType to skip lookup. |
| `destinationType` | string | no | One of `CITY`, `HIGH_LEVEL_REGION`, `NEIGHBORHOOD`, `COUNTRY`, `MULTI_CITY_VICINITY`, `BUS_STATION`, `METRO_STATION`, `TRAIN_STATION`, `POINT_OF_INTEREST`, `AIRPORT`, `PROVINCE_STATE`, `CONTINENT`, `GOOGLE_PLACE`. Autocomplete type for an already selected destination, such as CITY. |
| `dateFrom` | string | no | `YYYY-MM-DD`. Check-in date as YYYY-MM-DD, e.g. 2030-05-14. Today (UTC) or later. Send together with dateTo, or omit both. |
| `dateTo` | string | no | `YYYY-MM-DD`. Checkout date as YYYY-MM-DD, after dateFrom. Send together with dateFrom, or omit both. |
| `occupancy` | object | no | Guests for a dated search; requires dateFrom and dateTo. Default when omitted: 2 adults in 1 room. Example: {"adultCount":6,"rooms":1}. |
| `occupancy.adultCount` | integer | yes | 1–20. Number of adults, 1-20. |
| `occupancy.rooms` | integer | no | 1–20. Number of rooms, 1-20 and no more than adultCount. Default: 1. |
| `occupancy.childAges` | array of integer | no | Up to 20 items. Each: 0–17. Age of each child, 0-17, one entry per child. Omit when there are no children. |
| `limit` | integer | no | 1–20. Maximum stays to return, 1-20. Default: 10. |

Rules the schema cannot express:

- Send `destination`, or both `destinationId` and `destinationType`.
- Send `dateFrom` and `dateTo` together, or neither. `dateFrom` must be today (UTC) or later, and `dateTo` must be after it.
- `occupancy` needs both dates. `occupancy.rooms` must not exceed `occupancy.adultCount`.
- Omitted, `null` and blank optional arguments are treated the same. Unknown arguments are rejected.
- Dates are also accepted as `YYYY/MM/DD`. Dates with a time are rejected.

## Output

`structuredContent` has these fields. `content` carries a one-line text summary of the same result.

| Field | Type | Always present | Notes |
| --- | --- | --- | --- |
| `status` | string | yes | One of `results`, `choose_destination`, `destination_not_found`. |
| `destination` | object or null | yes |  |
| `destination.id` | string | yes | 1–256 characters. Pattern `^[^\s\x00-\x1f\x7f]+$`. |
| `destination.name` | string or null | yes | 1–200 characters. |
| `destination.type` | string | yes | One of `CITY`, `HIGH_LEVEL_REGION`, `NEIGHBORHOOD`, `COUNTRY`, `MULTI_CITY_VICINITY`, `BUS_STATION`, `METRO_STATION`, `TRAIN_STATION`, `POINT_OF_INTEREST`, `AIRPORT`, `PROVINCE_STATE`, `CONTINENT`, `GOOGLE_PLACE`. Autocomplete type for an already selected destination, such as CITY. |
| `destination.address` | array of string | yes | Up to 8 items. Each: Up to 200 characters. |
| `suggestions` | array of object | yes | Up to 8 items. |
| `suggestions[].id` | string | yes | 1–256 characters. Pattern `^[^\s\x00-\x1f\x7f]+$`. |
| `suggestions[].name` | string or null | yes | 1–200 characters. |
| `suggestions[].type` | string | yes | One of `CITY`, `HIGH_LEVEL_REGION`, `NEIGHBORHOOD`, `COUNTRY`, `MULTI_CITY_VICINITY`, `BUS_STATION`, `METRO_STATION`, `TRAIN_STATION`, `POINT_OF_INTEREST`, `AIRPORT`, `PROVINCE_STATE`, `CONTINENT`, `GOOGLE_PLACE`. Autocomplete type for an already selected destination, such as CITY. |
| `suggestions[].address` | array of string | yes | Up to 8 items. Each: Up to 200 characters. |
| `stays` | array of object | yes | Up to 20 items. |
| `stays[].placeId` | string | yes | UUID. |
| `stays[].name` | string | yes | At least 1 character. |
| `stays[].accommodationType` | string or null | yes |  |
| `stays[].address` | object | yes |  |
| `stays[].address.city` | string or null | yes |  |
| `stays[].address.country` | string or null | yes |  |
| `stays[].customerUrl` | string or null | yes | URL. |
| `stays[].availability` | string | yes | One of `available`, `unavailable`, `unknown`. |
| `stays[].starRating` | number | no | Above 0, up to 5. Hotel star rating, 1 to 5. |
| `stays[].images` | array of string | no | Up to 6 items. Each: Up to 2048 characters. Each: Pattern `^https:\/\/`. Up to 6 photo URLs. |
| `stays[].price` | object | no |  |
| `stays[].price.currency` | string | yes | 3–3 characters. Pattern `^[A-Z]{3}$`. Upper-case ISO 4217 code. |
| `stays[].price.amountMinor` | integer | yes | At least 0. Starting total in minor units for the requested dates. |
| `stays[].price.nights` | integer | no | At least 1. Nights the total covers. |
| `hasMore` | boolean | yes |  |

- `status` is `results`, `choose_destination` or `destination_not_found`. Only `results` carries stays.
- `availability` is `unknown` for every undated search, and for dated searches when it could not be confirmed.
- `price` appears only on stays that are `available`. It is an indicative starting total in minor units (`54474` with `USD` is 544.74) for the requested stay.
- `customerUrl` opens the stay on Nsuna. For dated searches it carries the same dates and guests.
- `hasMore` says more stays exist. There is no cursor; raise `limit` (up to 20) or narrow the destination.

## Annotations

| Annotation | Value |
| --- | --- |
| `readOnlyHint` | `true` |
| `destructiveHint` | `false` |
| `openWorldHint` | `true` |

## Example

Request (`params` of `tools/call`):

```json
{
  "name": "search_stays",
  "arguments": {
    "destination": "Cape Town",
    "dateFrom": "2027-03-10",
    "dateTo": "2027-03-12",
    "occupancy": {
      "adultCount": 2,
      "rooms": 1
    },
    "limit": 2
  }
}
```

Result, with one photo URL per stay kept for brevity:

```json
{
  "content": [
    {
      "type": "text",
      "text": "Found 2 stays for Cape Town: Taj Cape Town (available), Victoria and Alfred Hotel by NEWMARK (available). More search results exist."
    }
  ],
  "structuredContent": {
    "status": "results",
    "destination": {
      "id": "910",
      "name": "Cape Town",
      "type": "CITY",
      "address": [
        "Western Cape",
        "South Africa"
      ]
    },
    "suggestions": [],
    "stays": [
      {
        "placeId": "a29e43e1-466c-4ffa-a73c-cda75cd5a0f0",
        "name": "Taj Cape Town",
        "accommodationType": "Hotel",
        "address": {
          "city": "Cape Town",
          "country": "South Africa"
        },
        "customerUrl": "https://app.nsuna.com/stays/a29e43e1-466c-4ffa-a73c-cda75cd5a0f0?dateFrom=2027%2F03%2F10&dateTo=2027%2F03%2F12&adultCount=2&rooms=1",
        "availability": "available",
        "starRating": 5,
        "images": [
          "https://i.travelapi.com/lodging/4000000/3020000/3016400/3016361/c3d35b9f_z.jpg"
        ],
        "price": {
          "currency": "USD",
          "amountMinor": 54474,
          "nights": 2
        }
      },
      {
        "placeId": "1a320ca2-748e-48eb-98dc-dbd6ab28ee49",
        "name": "Victoria and Alfred Hotel by NEWMARK",
        "accommodationType": "Hotel",
        "address": {
          "city": "Cape Town",
          "country": "South Africa"
        },
        "customerUrl": "https://app.nsuna.com/stays/1a320ca2-748e-48eb-98dc-dbd6ab28ee49?dateFrom=2027%2F03%2F10&dateTo=2027%2F03%2F12&adultCount=2&rooms=1",
        "availability": "available",
        "starRating": 4,
        "images": [
          "https://i.travelapi.com/lodging/1000000/50000/46800/46797/1c0dff48_z.jpg"
        ],
        "price": {
          "currency": "USD",
          "amountMinor": 119953,
          "nights": 2
        }
      }
    ],
    "hasMore": true
  }
}
```

## Edge cases

### Ambiguous destination

Destination text resolves only when exactly one suggestion matches it by name. Otherwise `status` is `choose_destination` and `suggestions` lists up to 8 places. `Spring` returns (three of eight shown):

```json
{
  "status": "choose_destination",
  "destination": null,
  "suggestions": [
    {
      "id": "10121",
      "name": "Spring",
      "type": "CITY",
      "address": [
        "Montgomery County",
        "United States of America"
      ]
    },
    {
      "id": "3000748021",
      "name": "Spring",
      "type": "CITY",
      "address": [
        "Wiesenburg/Mark",
        "Brandenburg Region",
        "Germany"
      ]
    },
    {
      "id": "3088",
      "name": "Springbok",
      "type": "CITY",
      "address": [
        "Nama Khoi",
        "Northern Cape",
        "South Africa"
      ]
    }
  ],
  "stays": [],
  "hasMore": false
}
```

Call again with the chosen `id` as `destinationId` and its `type` as `destinationType`. See [Handle an ambiguous destination](https://mcp.nsuna.com/docs/guides.md#ambiguous).

### No matching destination

```json
{
  "status": "destination_not_found",
  "destination": null,
  "suggestions": [],
  "stays": [],
  "hasMore": false
}
```

### Invalid arguments

Invalid calls return a tool error (`isError: true`) that names each field and the expected value. Past and reversed dates:

```text
Input validation error: Invalid arguments for tool search_stays: dateFrom: must be today or later (today is 2026-11-23 UTC). dateTo: must be after dateFrom (at least one night). Correct these arguments and call search_stays again.
```

More rooms than adults, and an unknown argument:

```text
Input validation error: Invalid arguments for tool search_stays: "adults" is not an accepted argument; use occupancy.adultCount. occupancy.rooms: must not exceed occupancy.adultCount (at least one adult per room). Correct these arguments and call search_stays again.
```

### No stays

`status: "results"` with an empty `stays` array means nothing was returned for this search. It is not a statement that the destination is sold out.
