物件条件検索をAIに公開する

「〇〇駅で家賃10万円以内の物件」に該当物件を返し、内見の申込は通常UIに残す構成です。

ライブデモ

対応環境では search_properties ツールが登録されます。未対応の環境では、同じフォームが通常UIとして動きます。

Live tool

search_properties

対応状況を確認中
input{"type":"object","properties":{"station":{"type":"string","description":"沿線・駅のキーワード"},"maxRent":{"type":"integer","description":"家賃上限 (円)。未指定なら上限なし"}},"required":["station"],"additionalProperties":false}
result

入力例を選ぶか、フォームから実行できます。

実装コード

家賃の上限は数値で検証します。物件データには、管理会社の内部情報など公開すべきでない値を含めません。

JavaScriptImperative API
await document.modelContext.registerTool({
  name: "search_properties",
  title: "物件を検索",
  description:
    "公開中の賃貸物件を駅名と家賃条件で検索する。申込や変更は行わない。",
  inputSchema: {
    type: "object",
    properties: {
      station: { type: "string", description: "沿線・駅のキーワード" },
      maxRent: { type: "integer", description: "家賃上限 (円)。未指定なら上限なし" },
    },
    required: ["station"],
    additionalProperties: false,
  },
  annotations: { readOnlyHint: true },
  execute: async ({ station, maxRent }) => {
    if (typeof station !== "string" || station.length > 30) {
      throw new Error("stationには30文字以内の文字列を指定してください。");
    }
    if (maxRent !== undefined && (typeof maxRent !== "number" || maxRent < 10000)) {
      throw new Error("maxRentは10000以上の整数で指定してください。");
    }
    return searchProperties(station, maxRent);
  },
});

安全設計

  • 検索は読み取り専用。申込・内見予約・変更はしない
  • 成約済み物件や社内メモは返さない
  • 内見や申込は通常UIのフォームで、人間が確認して行う
  • 未対応ブラウザでは、同じ検索フォームを通常UIとして使える
次の行動

あなたのサイトを診断する

公開URLから、WebMCPの導入候補を確認できます。

対応を診断