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.

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 / 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"
      +}
  2. 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"
  3. 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"
      +}
  4. First observed

TDQS

A4.1/5.0
Behavior4/5

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

Annotations already cover readOnly/idempotent/non-destructive, so the bar is lower; the description adds real behavioral context beyond them — state carry-over ("keeps that search's place and dates") and authentication/state behavior ("no session or token is needed"). Minor gap: it doesn't say what happens if the referenced prior search is missing or ambiguous.

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?

Three tight sentences, front-loaded with the core action and its scope; every clause carries information. Slight redundancy: the quoted refinement examples ("more rustic", "better views") duplicate the examples already in the `refinement` schema description.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

With an output schema present, return values need no explanation, and the nested parameters are fully documented in-schema. The description covers the carry-over behavior and statelessness well; the only thing left implicit is fallback behavior when the prior search context is unavailable or previousIntent is omitted.

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 coverage is 100%, so the baseline is 3. The description correctly explains the wiring (original `query` plus `refinement`, and `currentIntent` passed as `previousIntent`) and that previousIntent is optional, but this largely restates schema descriptions rather than adding new semantics such as how previousIntent influences ranking.

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+resource ("Refine a previous CielStay search") and enumerates concrete example refinements, so the agent knows exactly what transformation this performs. The phrase "a previous ... search" implicitly contrasts with the initial search sibling search_vacation_rentals, making the two distinguishable 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?

"For any follow-up that adds to or changes an earlier search in the conversation" gives a clear selection condition, and "keeps that search's place and dates" clarifies it is not a fresh search. It never names the alternative tool (search_vacation_rentals) or states explicitly that a brand-new query should not use this, so it falls short of a full when/when-not/alternatives treatment.

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