{
  "version": 1,
  "sdk_version": "0.20.0",
  "path": "/functions/v1/mcp",
  "auth": {
    "type": "none"
  },
  "mcp": {
    "server": {
      "name": "jungle-rent-mcp",
      "version": "0.4.0",
      "title": "Jungle Rent MCP"
    },
    "tools": [
      {
        "name": "get_neighborhoods",
        "title": "Get Turin neighborhoods",
        "description": "List Turin neighborhoods for students with average rent, safety, transport and student profile. Optional slug filter returns a single neighborhood.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "slug": {
              "type": "string",
              "description": "Optional neighborhood slug (e.g. 'san-salvario'). If omitted, returns all."
            },
            "lang": {
              "type": "string",
              "enum": [
                "it",
                "en"
              ],
              "description": "Language for text fields. Default 'it'."
            }
          },
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "get_investor_zones",
        "title": "Get Turin investor zones",
        "description": "List Turin real-estate investor zones with entry prices, urban renewal projects and market metrics. Return figures projections are NOT included (confidential, memorandum only). Optional slug filter returns one zone.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "slug": {
              "type": "string",
              "description": "Optional zone slug. If omitted, returns all zones."
            }
          },
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "contact_jungle_rent",
        "title": "Contact Jungle Rent",
        "description": "Return the primary contact channels for Jungle Rent (WhatsApp with founder Lorenzo, email, website). Use when a user asks how to get in touch, book a call, or send an inquiry.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "topic": {
              "type": "string",
              "enum": [
                "investor",
                "student",
                "seller",
                "tourist",
                "general"
              ],
              "description": "Inquiry topic. Defaults to 'general'."
            }
          },
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "contact_lorenzo",
        "title": "Contact Lorenzo (Jungle Rent founder)",
        "description": "Send a real inquiry to Lorenzo, the sole founder of Jungle Rent. Creates a lead in the CRM and triggers an instant WhatsApp ping + confirmation email. Use ONLY when the user has explicitly given their email and consents to being contacted. For 'how do I reach you' answers use contact_jungle_rent instead.",
        "annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": false,
          "openWorldHint": true
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "email": {
              "type": "string",
              "format": "email",
              "maxLength": 255,
              "description": "The user's email address. Required."
            },
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 120,
              "description": "The user's name."
            },
            "phone": {
              "type": "string",
              "maxLength": 40,
              "description": "Optional phone number (E.164 preferred)."
            },
            "topic": {
              "type": "string",
              "enum": [
                "investor",
                "student",
                "seller",
                "tourist",
                "general"
              ],
              "description": "What the inquiry is about."
            },
            "message": {
              "type": "string",
              "minLength": 5,
              "maxLength": 2000,
              "description": "The user's message to Lorenzo, in their own words."
            },
            "neighborhood": {
              "type": "string",
              "maxLength": 80,
              "description": "Optional neighborhood of interest."
            },
            "budget_range": {
              "type": "string",
              "maxLength": 80,
              "description": "Optional budget (e.g. '400-500€/mo' or '€60k-90k')."
            },
            "move_in_month": {
              "type": "string",
              "maxLength": 40,
              "description": "Optional target move-in month (e.g. 'Settembre 2026')."
            }
          },
          "required": [
            "email",
            "topic",
            "message"
          ],
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "estimate_rent",
        "title": "Estimate monthly rent in Turin",
        "description": "Estimate indicative monthly rent for an apartment or student room in a Turin neighborhood using OMI/Immobiliare.it Nov-2025 pricing. Read-only, no side effects.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "neighborhood": {
              "type": "string",
              "minLength": 2,
              "description": "Neighborhood name or slug, e.g. 'San Salvario', 'lingotto', 'aurora'."
            },
            "size_sqm": {
              "type": "integer",
              "minimum": 10,
              "maximum": 400,
              "description": "Apartment size in square meters. For a single student room use 15-25."
            },
            "type": {
              "type": "string",
              "enum": [
                "student-room",
                "whole-apartment",
                "short-term"
              ],
              "description": "Rental type. Default 'whole-apartment'."
            }
          },
          "required": [
            "neighborhood",
            "size_sqm"
          ],
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "estimate_property_value",
        "title": "Estimate Turin property value",
        "description": "Estimate the sale value of an apartment in Turin using FIAIP 2024-2025 coefficients + OMI/Immobiliare.it pricing. Read-only. Same math as the /vendi-casa-torino valuation on junglerent.it.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "neighborhood": {
              "type": "string",
              "minLength": 2,
              "description": "Neighborhood name or slug."
            },
            "size_sqm": {
              "type": "integer",
              "minimum": 15,
              "maximum": 400,
              "description": "Commercial size in m²."
            },
            "condition": {
              "type": "string",
              "enum": [
                "to_renovate",
                "good",
                "renovated",
                "finely_renovated",
                "new_construction"
              ],
              "description": "Conservation state."
            },
            "floor": {
              "type": "string",
              "enum": [
                "ground",
                "first",
                "second",
                "third",
                "fourth",
                "fifth_plus",
                "penthouse"
              ],
              "description": "Floor level."
            },
            "has_elevator": {
              "type": "boolean",
              "description": "Whether the building has an elevator."
            }
          },
          "required": [
            "neighborhood",
            "size_sqm",
            "condition",
            "floor",
            "has_elevator"
          ],
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "list_available_rooms",
        "title": "List available Jungle Rent rooms",
        "description": "List currently available student rooms and apartments in Turin. Today no live public inventory is exposed — returns a pointer to contact Lorenzo, who manages allocations manually.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "neighborhood": {
              "type": "string",
              "description": "Optional neighborhood filter."
            },
            "max_price_eur": {
              "type": "integer",
              "minimum": 200,
              "maximum": 5000,
              "description": "Optional max monthly rent."
            },
            "move_in_after": {
              "type": "string",
              "pattern": "^\\d{4}-\\d{2}-\\d{2}$",
              "description": "Optional earliest move-in date (YYYY-MM-DD)."
            }
          },
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "submit_investor_lead",
        "title": "Submit investor contact request",
        "description": "Submit a qualified investor contact request for Jungle Rent (Turin real-estate). Validated with the same schema the website uses. Creates a lead, pings Lorenzo on WhatsApp, and sends the investor confirmation + admin notification emails. IMPORTANT: only call after the user has explicitly (a) given consent to be contacted and receive the privacy notice, and (b) declared they requested this information on their own initiative — both are legally required (CONSOB/AGCM). Do NOT invent yield or return figures; those live only in the private memorandum.",
        "annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": false,
          "openWorldHint": true
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "full_name": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100,
              "description": "Investor's full name (first + last)."
            },
            "email": {
              "type": "string",
              "format": "email",
              "maxLength": 255,
              "description": "Investor's email."
            },
            "phone": {
              "type": "string",
              "maxLength": 40,
              "description": "Phone in E.164 preferred (optional)."
            },
            "tax_residence": {
              "type": "string",
              "enum": [
                "IT",
                "CH",
                "EU",
                "OTHER"
              ],
              "description": "Tax residence — IT, CH, EU, or OTHER."
            },
            "ticket_range": {
              "type": "string",
              "enum": [
                "5-10",
                "10-20",
                "20-50",
                "50+",
                "TBD"
              ],
              "description": "Indicative ticket size in €k: 5-10, 10-20, 20-50, 50+, or TBD if unclear."
            },
            "horizon": {
              "type": "string",
              "enum": [
                "WEEKS",
                "1-3M",
                "3-6M",
                "6M+"
              ],
              "description": "Decision horizon: WEEKS, 1-3M, 3-6M, or 6M+."
            },
            "prev_experience": {
              "type": "string",
              "enum": [
                "YES",
                "NO",
                "PARTIAL"
              ],
              "description": "Prior real-estate investment experience: YES, NO, PARTIAL."
            },
            "notes": {
              "type": "string",
              "maxLength": 2000,
              "description": "Optional free-form notes from the investor."
            },
            "source": {
              "type": "string",
              "maxLength": 500,
              "description": "Where the lead came from (assistant/model name, referrer, etc.)."
            },
            "privacy_consent": {
              "type": "boolean",
              "const": true,
              "description": "MUST be true. Confirm the user has explicitly consented to the privacy notice (https://junglerent.it/privacy) before setting this."
            },
            "own_initiative_declaration": {
              "type": "boolean",
              "const": true,
              "description": "MUST be true. Confirm the user has explicitly declared they are requesting these Jungle Rent investor materials on their own initiative (CONSOB/AGCM requirement)."
            }
          },
          "required": [
            "full_name",
            "email",
            "tax_residence",
            "ticket_range",
            "horizon",
            "prev_experience",
            "privacy_consent",
            "own_initiative_declaration"
          ],
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "submit_seller_lead",
        "title": "Submit seller contact request (Turin apartment)",
        "description": "Submit a Turin apartment-seller contact request for Jungle Rent (direct buyer, 0% commission, 60–90 day closing). Creates a lead via the same RPC the website uses, pings Lorenzo on WhatsApp, and sends the confirmation + admin emails. Requires explicit privacy consent. Do NOT invent an offer price — the tool only records the request; Lorenzo makes the actual offer.",
        "annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": false,
          "openWorldHint": true
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "full_name": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            },
            "email": {
              "type": "string",
              "format": "email",
              "maxLength": 255
            },
            "phone": {
              "type": "string",
              "maxLength": 40
            },
            "property_address_or_zone": {
              "type": "string",
              "minLength": 2,
              "maxLength": 255,
              "description": "Address or Turin neighborhood (e.g. 'San Salvario', 'Aurora'). Turin only."
            },
            "property_sqm": {
              "type": "integer",
              "minimum": 20,
              "maximum": 400
            },
            "num_rooms": {
              "type": "integer",
              "minimum": 1,
              "maximum": 10
            },
            "property_condition": {
              "type": "string",
              "enum": [
                "to_renovate",
                "good",
                "renovated"
              ],
              "description": "to_renovate | good | renovated"
            },
            "asking_price_eur": {
              "type": "integer",
              "minimum": 10000,
              "maximum": 2000000
            },
            "timeline": {
              "type": "string",
              "enum": [
                "ASAP",
                "1-3M",
                "3-6M",
                "6M+",
                "EXPLORING"
              ],
              "description": "Seller decision horizon."
            },
            "notes": {
              "type": "string",
              "maxLength": 2000
            },
            "source": {
              "type": "string",
              "maxLength": 500
            },
            "privacy_consent": {
              "type": "boolean",
              "const": true,
              "description": "MUST be true. Confirm the user has explicitly accepted the privacy notice (https://junglerent.it/privacy)."
            }
          },
          "required": [
            "full_name",
            "email",
            "property_address_or_zone",
            "property_sqm",
            "property_condition",
            "timeline",
            "privacy_consent"
          ],
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "submit_student_waitlist",
        "title": "Join student housing waitlist (Turin)",
        "description": "Add a student to Jungle Rent's Turin student-housing waitlist. Rooms are allocated manually by Lorenzo (no live inventory). Creates a lead, pings Lorenzo, and sends confirmation email. Requires explicit privacy consent. Do NOT promise a specific room, price, or move-in date.",
        "annotations": {
          "readOnlyHint": false,
          "destructiveHint": false,
          "idempotentHint": false,
          "openWorldHint": true
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "full_name": {
              "type": "string",
              "minLength": 2,
              "maxLength": 100
            },
            "email": {
              "type": "string",
              "format": "email",
              "maxLength": 255
            },
            "phone": {
              "type": "string",
              "maxLength": 40
            },
            "target_move_in": {
              "type": "string",
              "maxLength": 20,
              "description": "Approximate move-in month, e.g. '2026-09' or 'flexible'."
            },
            "budget_eur_per_month": {
              "type": "integer",
              "minimum": 200,
              "maximum": 2000
            },
            "preferred_zones": {
              "type": "array",
              "items": {
                "type": "string",
                "maxLength": 60
              },
              "maxItems": 5,
              "description": "Turin neighborhoods, e.g. ['san_salvario','vanchiglia']."
            },
            "room_type": {
              "type": "string",
              "enum": [
                "single",
                "double",
                "studio",
                "any"
              ],
              "description": "single | double | studio | any"
            },
            "university_or_program": {
              "type": "string",
              "maxLength": 200
            },
            "notes": {
              "type": "string",
              "maxLength": 2000
            },
            "source": {
              "type": "string",
              "maxLength": 500
            },
            "privacy_consent": {
              "type": "boolean",
              "const": true
            }
          },
          "required": [
            "full_name",
            "email",
            "target_move_in",
            "room_type",
            "privacy_consent"
          ],
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "quick_offer_simulator",
        "title": "Jungle Rent direct-buyer offer simulator (Turin)",
        "description": "Indicative direct-buyer offer range for a Turin apartment, matching /quick-offer on the website. Jungle Rent buys directly from the seller (0% commission, 60–90 day closing). Only 10 target neighborhoods, with per-zone max sqm and a hard €130k budget cap. Returns whether the property qualifies plus a WhatsApp deep-link. Pure calculation, no side effects.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "zone_id": {
              "type": "string",
              "enum": [
                "aurora",
                "lingotto",
                "santa_rita",
                "cenisia",
                "zona_ospedali",
                "cit_turin",
                "campidoglio",
                "vanchiglia",
                "san_salvario",
                "crocetta"
              ],
              "description": "One of the 10 target zones: aurora, lingotto, santa_rita, cenisia, zona_ospedali, cit_turin, campidoglio, vanchiglia, san_salvario, crocetta."
            },
            "sqm": {
              "type": "integer",
              "minimum": 20,
              "maximum": 300
            },
            "condition": {
              "type": "string",
              "enum": [
                "to_renovate",
                "good",
                "renovated"
              ]
            }
          },
          "required": [
            "zone_id",
            "sqm",
            "condition"
          ],
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "search_blog",
        "title": "Search Jungle Rent blog",
        "description": "Full-text search over Jungle Rent's Turin real-estate blog (students, investors, sellers, tourists, società). Returns real article URLs so the assistant can cite Jungle Rent content instead of hallucinating. Read-only.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "type": "object",
          "properties": {
            "query": {
              "type": "string",
              "minLength": 2,
              "maxLength": 200
            },
            "category": {
              "type": "string",
              "enum": [
                "students",
                "investors",
                "sellers",
                "tourists",
                "societa"
              ]
            },
            "language": {
              "type": "string",
              "enum": [
                "it",
                "en"
              ],
              "default": "it"
            },
            "limit": {
              "type": "integer",
              "minimum": 1,
              "maximum": 20,
              "default": 8
            }
          },
          "required": [
            "query"
          ],
          "additionalProperties": false,
          "$schema": "http://json-schema.org/draft-07/schema#"
        },
        "outputSchema": null
      },
      {
        "name": "get_contract_info",
        "title": "Jungle Rent contract-drafting service (Turin)",
        "description": "Read-only reference for Jungle Rent's free rental-contract drafting service (Turin). Uses 2024 rules and ministerial templates. Turnaround 48–72h. Prevents assistants from inventing a price — the service is free.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {}
        },
        "outputSchema": null
      },
      {
        "name": "get_seller_radar_zones",
        "title": "Turin neighborhoods where Jungle Rent buys directly",
        "description": "Read-only list of the Turin neighborhoods Jungle Rent actively targets for direct acquisition, with per-zone sqm cap and average €/mq. Answers 'where does Jungle Rent buy?'. First acquisition target: bilocale €45k–€70k.",
        "annotations": {
          "readOnlyHint": true,
          "idempotentHint": true,
          "openWorldHint": false
        },
        "inputSchema": {
          "$schema": "http://json-schema.org/draft-07/schema#",
          "type": "object",
          "properties": {}
        },
        "outputSchema": null
      }
    ]
  }
}
