corpus_stats
ClaudeDay-by-day Cubi corpus activity — aggregate counts only, no listings. Use this for dashboards or "how is the corpus moving" questions: active listing totals, per-country breakdown, and per-day series of newly ingested listings, deactivated listings, and detected price drops. Args: days: Trailing window length in days (1-90, default 30). country: Optional full country name filter, e.g. "Portugal", "Spain". Case-insensitive. Omit for the whole corpus. Returns: JSON string: {country, days, active_listings, active_by_country, daily: {new_listings, deactivated, price_drops}} where each daily series maps "YYYY-MM-DD" to a count (price_drops adds avg_pct, negative = average drop size in percent).
data_layer_stats
ClaudeLive coverage of Cubi's per-listing enrichment data layers. Use for a data-pipeline dashboard: how many active listings carry each environmental / accessibility layer, the flood-risk band split, and the per-country share of listings in a modelled High (1-in-20-year) river floodplain. Returns: JSON string. Warm cache (exact, ~6h fresh): {active_listings, cached: true, computed_at, coverage:{noise, air_quality, greenery, coastal, flood, drive_time, campsite}, flood:{high, medium, low, none, at_risk}, flood_by_country:[{country, n, high_pct}], climate_regions, str_areas, price_moves}. Before the first cache tick, a fast planner-stat fallback: {active_listings, approx: true, cached: false, coverage:{…}}.
filter_listings
ClaudeStructured property filter — bypasses natural-language extraction. Use this when filters are already known (from prior turns or external state) and you want to skip the OpenAI NLU step. For free-text user queries like "cheap apartments near the beach", use search_properties instead. All list args are AND-combined; within a list, items are typically OR. Locations accept countries, regions, cities, neighborhoods. Types accept apartment/house/villa/townhouse/penthouse/studio/land/etc. Features are structural (Balcony, Pool, Sea View); amenities are services (Gym, Concierge, Security). transaction_type picks sale vs rent — pass it whenever the request is one or the other, because WITHOUT it both are returned and a rental budget silently reads as a purchase budget. For rentals price_period says what the price is per (a EUR 1,600 "month" rental and a EUR 1,600,000 sale are both "1600" to a bare min/max_price bound). radius_center + radius_km search around a named place instead of within it. Note prices may be missing: a listing marked "Price on request" has no price at all, so it is NOT excluded by min_price/max_price and will still appear under a budget cap. Returns: Markdown summary + numbered listing cards (count and avg price up top).
get_listing
ClaudeFetch one Cubi Estate listing's full details. Use after a search when the user wants the long description, every feature/amenity, or the full image list for a specific result. Args: listing_id: Either the listing URL exactly as shown in a search result (e.g. https://www.example.com/property/123 — the simplest option, since every result card prints its URL), or a source-prefixed id from a prior result (e.g. remax:12345). Do not invent either. lang: ISO 639-1 language code (en/pt/es/fr/de/nl/ru). Defaults to en. Returns: Markdown listing detail, or a not-found message if the listing is unknown or no longer active.
raise_stats
ClaudeDaily-raise (new listings/day) for the Cubi corpus, SALE/RENT split — aggregate counts only, no listings. Complements corpus_stats (which has no transaction split). Table-ready: per-country today / yesterday / trailing-7-completed-day sale+rent, plus the top-15 providers by 7-day new-listing volume with their sale/rent split. (The 21-day per-country chart SERIES stays with corpus_stats — scanning 21 days of country/txn heap here is too slow for an interactive tool.) Served from precomputed MVs refreshed a few times a day (never a live scan), so it is instant; refreshed_at is when the underlying data was last rebuilt. Returns: JSON string: {today:"YYYY-MM-DD", days_completed:int, refreshed_at:"… UTC", all:{today,yest,sale7,rent7,total7}, countries:[{country,today,yest,sale7,rent7,total7}] (desc by total7), providers:[{src,sale,rent,total}]}. "all" sums every country incl null.
search_properties
ClaudeSearch Cubi Estate property listings across 14 European countries. Use this whenever the user asks to find or filter real estate: apartments, houses, villas, plots, by location, price range, bedrooms, area, or features like pool, balcony, sea view. Do NOT use for questions about a specific listing's details — that requires a separate fetch. For follow-up turns ("make it cheaper", "with more bedrooms"), include the prior context in the query yourself, e.g.: "previous: 2-bed apartment in Lisbon under 500k. now: with at least 3 bedrooms" Args: query: Natural-language property search request. lang: ISO 639-1 language code for the response. One of: en, pt, es, fr, de, nl, ru. Defaults to en. limit: How many listings to return (1-25). Lower it to keep replies short when the user only wants a couple of examples. Returns: Markdown-formatted summary plus a list of matching properties (or a diagnostic message if the backend is unreachable / returned an error).