Skip to main content
Glama

Refine a search

refine_search
Read-onlyIdempotent

Refine a previous CielStay search in natural language, such as "more rustic", "closer to the park", "better views", "bigger place" or "with ping pong". For any follow-up that adds to or changes an earlier search in the conversation; keeps that search's place and dates. Takes the original query plus the refinement, and the earlier currentIntent as previousIntent; no session or token is needed.

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": {
      "query": "<query>",
      "refinement": "<refinement>"
    },
    "name": "refine_search"
  }
}

Input Schema

NameRequiredDescriptionDefault
queryYesThe original search query you want to refine, exactly as you sent it before.
personaNoCarry the same persona through from the original search, if you sent one.
travellerNoThe traveller fields from the original search, with anything the traveller has added since. Used for ranking and never stored.
refinementYesNatural language refinement instruction. Examples: "more rustic and less modern", "closer to the water", "something with better views", "bigger — needs 3+ bedrooms".
previousIntentNoThe `currentIntent` object from the previous response, if you still have it. Preserves location and dates across the refinement. Optional — omit it and the refinement still works.

Output Schema

NameRequiredDescriptionDefault
noticeNo
hasMoreNo
resultsYes
rankedForNoWhat these results were ranked for: place, guests, dates, amenities, traveller
totalFoundNo
currentIntentNoPass to refine_search as previousIntent to keep place and dates
rankingQuestionNoPresent when nothing is known about the traveller: the question whose answer would most change this ranking. An answer can be sent as `traveller`

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • addedOutput schema / properties / results / items / properties / character
      Added value: +{
      +  "description": "The home's character in a fixed vocabulary (cielstay.com/docs/api#character), each tag with the host's own sentence as evidence; the tags and quotes are the host's description of the home, not CielStay's assessment",
      +  "items": {
      +    "additionalProperties": false,
      +    "properties": {
      +      "checkedAt": {
      +        "type": [
      +          "string",
      +          "null"
      +        ]
      +      },
      +      "evidence": {
      +        "items": {
      +          "additionalProperties": false,
      +          "properties": {
      +            "field": {
      +              "type": "string"
      +            },
      +            "note": {
      +              "type": "string"
      +            },
      +            "quote": {
      +              "type": "string"
      +            },
      +            "source": {
      +              "type": "string"
      +            }
      +          },
      +          "required": [
      +            "source",
      +            "note"
      +          ],
      +          "type": "object"
      +        },
      +        "type": "array"
      +      },
      +      "facet": {
      +        "description": "setting, architecture, character, atmosphere or experiences",
      +        "type": "string"
      +      },
      +      "label": {
      +        "type": "string"
      +      },
      +      "matched": {
      +        "type": "boolean"
      +      },
      +      "strength": {
      +        "type": "string"
      +      },
      +      "tag": {
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "tag",
      +      "facet",
      +      "label",
      +      "evidence"
      +    ],
      +    "type": "object"
      +  },
      +  "type": "array"
      +}
  2. Changed1 schema field changed
    • addedOutput schema / properties / results / items / properties / provenance
      Added value: +{
      +  "anyOf": [
      +    {
      +      "additionalProperties": false,
      +      "description": "Where and when this home's facts were observed",
      +      "properties": {
      +        "availabilityNote": {
      +          "description": "Where and when availability was last read; not live",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "bookingLinkConfirmed": {
      +          "description": "When CielStay's link check last opened the host's booking link (YYYY-MM-DD)",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "locationPrecision": {
      +          "description": "'exact' or 'town' (the pin is the town, not the home)",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "priceNote": {
      +          "description": "Where and when the price was observed, e.g. \"Last seen on 2026-11-26 on the booking site, before taxes\"; an observation, not a live quote",
      +          "type": [
      +            "string",
      +            "null"
      +          ]
      +        },
      +        "verified": {
      +          "description": "Meets the verified-property definition at cielstay.com/statistics: live, bookable on the host's own site, link confirmed within 14 days, exact location, a photo",
      +          "type": [
      +            "boolean",
      +            "null"
      +          ]
      +        }
      +      },
      +      "type": "object"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Where and when this home's facts were observed"
      +}
  3. Changed1 schema field changed
    • addedOutput schema / properties / results / items / properties / bookNow
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "Present when the host offers Book now (book_stay): the host's limits for it",
      +  "properties": {
      +    "available": {
      +      "type": "boolean"
      +    },
      +    "maxGuests": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "maxNights": {
      +      "description": "Longest stay the host accepts through Book now",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "minLeadDays": {
      +      "description": "Fewest days between booking and arrival",
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    },
      +    "note": {
      +      "type": "string"
      +    },
      +    "petsAllowed": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "available",
      +    "note"
      +  ],
      +  "type": "object"
      +}
  4. Changed1 schema field changed
    • addedOutput schema / properties / results / items / properties / messageHost
      Added value: +{
      +  "description": "Present with messageHostUrl: how to send the traveller's message to the host right now with contact_host",
      +  "type": "string"
      +}
  5. Changed7 schema fields changed
    • addedInput schema / properties / traveller
      Added value: +{
      +  "additionalProperties": false,
      +  "description": "The traveller fields from the original search, with anything the traveller has added since. Used for ranking and never stored.",
      +  "properties": {
      +    "avoid": {
      +      "type": "string"
      +    },
      +    "likes": {
      +      "type": "string"
      +    },
      +    "tripPurpose": {
      +      "type": "string"
      +    },
      +    "whoIsGoing": {
      +      "type": "string"
      +    }
      +  },
      +  "type": "object"
      +}
    • addedOutput schema / properties / rankedFor
      Added value: +{
      +  "additionalProperties": true,
      +  "description": "What these results were ranked for: place, guests, dates, amenities, traveller",
      +  "properties": {},
      +  "type": "object"
      +}
    • addedOutput schema / properties / rankingQuestion
      Added value: +{
      +  "description": "Present when nothing is known about the traveller: the question whose answer would most change this ranking. An answer can be sent as `traveller`",
      +  "type": "string"
      +}
    • removedOutput schema / properties / results / items / properties / readyToBook / $ref
      Removed value: -"#/properties/currentIntent/anyOf/0"
    • addedOutput schema / properties / results / items / properties / readyToBook / additionalProperties
      Added value: +true
    • addedOutput schema / properties / results / items / properties / readyToBook / properties
      Added value: +{}
    • addedOutput schema / properties / results / items / properties / readyToBook / type
      Added value: +"object"
  6. Changed1 schema field changed
    • addedOutput schema / properties / results / items / properties / messageHostUrl
      Added value: +{
      +  "description": "Present only when someone can receive a message about this home: the listing page opened at its message form with the stay filled in (free)",
      +  "type": "string"
      +}
  7. Changed5 schema fields changed
    • addedInput schema / properties / previousIntent / additionalProperties
      Added value: +true
    • addedInput schema / properties / previousIntent / properties
      Added value: +{
      +  "activities": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "aestheticPrefs": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  },
      +  "filters": {
      +    "additionalProperties": true,
      +    "properties": {
      +      "checkIn": {
      +        "type": "string"
      +      },
      +      "checkOut": {
      +        "type": "string"
      +      },
      +      "guests": {
      +        "type": "number"
      +      }
      +    },
      +    "type": "object"
      +  },
      +  "vibePrefs": {
      +    "items": {
      +      "type": "string"
      +    },
      +    "type": "array"
      +  }
      +}
    • addedInput schema / properties / previousIntent / type
      Added value: +"object"
    • addedOutput schema / properties / currentIntent / anyOf
      Added value: +[
      +  {
      +    "additionalProperties": true,
      +    "properties": {},
      +    "type": "object"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • addedOutput schema / properties / results / items / properties / readyToBook / $ref
      Added value: +"#/properties/currentIntent/anyOf/0"
  8. Changed1 schema field changed
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "$schema": "http://json-schema.org/draft-07/schema#",
      +  "additionalProperties": true,
      +  "properties": {
      +    "currentIntent": {
      +      "description": "Pass to refine_search as previousIntent to keep place and dates"
      +    },
      +    "hasMore": {
      +      "type": [
      +        "boolean",
      +        "null"
      +      ]
      +    },
      +    "notice": {
      +      "type": [
      +        "string",
      +        "null"
      +      ]
      +    },
      +    "results": {
      +      "items": {
      +        "additionalProperties": true,
      +        "properties": {
      +          "bedrooms": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "bookUrl": {
      +            "description": "The host's booking page, opened through CielStay so the referral is counted",
      +            "type": "string"
      +          },
      +          "cielstayUrl": {
      +            "type": "string"
      +          },
      +          "directUrl": {
      +            "type": "string"
      +          },
      +          "id": {
      +            "type": "string"
      +          },
      +          "location": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          },
      +          "maxGuests": {
      +            "type": [
      +              "number",
      +              "null"
      +            ]
      +          },
      +          "price": {
      +            "additionalProperties": true,
      +            "properties": {
      +              "amountUsd": {
      +                "type": "number"
      +              },
      +              "basis": {
      +                "description": "What the figure is: e.g. avg_night_incl_fees, avg_nightly_rate_excl_fees, host_set, monthly_rent",
      +                "type": "string"
      +              },
      +              "label": {
      +                "description": "The qualifier to show next to the price",
      +                "type": "string"
      +              },
      +              "per": {
      +                "description": "\"night\" or \"month\"",
      +                "type": "string"
      +              }
      +            },
      +            "required": [
      +              "amountUsd",
      +              "per",
      +              "basis",
      +              "label"
      +            ],
      +            "type": "object"
      +          },
      +          "priceNote": {
      +            "type": "string"
      +          },
      +          "readyToBook": {
      +            "description": "Where to book; with dates, availability and the total on the host's site where it can be read"
      +          },
      +          "referenceUrl": {
      +            "type": "string"
      +          },
      +          "title": {
      +            "type": [
      +              "string",
      +              "null"
      +            ]
      +          }
      +        },
      +        "required": [
      +          "id"
      +        ],
      +        "type": "object"
      +      },
      +      "type": "array"
      +    },
      +    "totalFound": {
      +      "type": [
      +        "number",
      +        "null"
      +      ]
      +    }
      +  },
      +  "required": [
      +    "results"
      +  ],
      +  "type": "object"
      +}
  9. First observed

TDQS

A4.4/5.0
Behavior4/5

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

Goes beyond the readOnly/idempotent/non-destructive annotations by disclosing that no session or token is required, that location and dates carry over from the prior search, and that previousIntent is optional so the refinement still works without it. It also clarifies that traveller data is used only for ranking and never stored, which the annotations do not express.

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?

Purpose and triggering condition are front-loaded, followed by concrete examples and then parameter/state guidance. The example list is somewhat dense but each item clarifies the range of accepted natural-language input rather than padding.

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 stateful refinement tool with five params, nested objects, and an output schema (so return values need not be described), the definition covers what an agent needs: when to call it, how to pass the prior intent, and that no session setup is required. Nothing essential to correct invocation 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 the baseline is 3; the description adds real meaning on top — `query` must be the original query exactly as previously sent, `previousIntent` is the earlier `currentIntent` and is optional, and `persona` should be carried through from the original search. This tells the agent how to thread state across calls, which the schema alone does not.

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 — refine a previous CielStay search in natural language — and anchors it with concrete refinement examples ("more rustic", "closer to the park", "with ping pong"). The phrase "previous CielStay search" plus "follow-up that adds to or changes an earlier search" clearly separates it from the initial search tool.

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?

Gives a clear trigger condition: use it for any follow-up that adds to or changes an earlier search in the conversation, and notes that place and dates are preserved. It stops short of an explicit exclusion (e.g. "for a brand-new search use search_vacation_rentals"), but the "previous search" framing makes the boundary inferable.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources