{
  "$schema": "https://gounarealty.com/schemas/agents-discovery-v1.json",
  "name": "Gouna Realty",
  "legalName": "Gouna Realty",
  "tagline": "El Gouna real-estate aggregator — listings from 6 authorized source platforms",
  "description": "Public agent-discovery file for AI assistants (ChatGPT, Claude, Perplexity, Gemini, custom MCP clients). Lists every machine-readable manifest, the function-calling tools we expose, and how to reach a human if the agent runs into a blocker.",
  "version": "1.0.0",
  "language": ["en", "nl", "ar", "ru", "de"],
  "discovery": {
    "mcp_endpoint": "https://gounarealty.com/.well-known/mcp/listings",
    "openapi_spec": "https://gounarealty.com/api/agent/openapi.json",
    "ai_plugin_manifest": "https://gounarealty.com/.well-known/ai-plugin.json",
    "llms_index": "https://gounarealty.com/llms.txt",
    "llms_full": "https://gounarealty.com/llms-full.txt",
    "ai_txt": "https://gounarealty.com/ai.txt",
    "sitemap": "https://gounarealty.com/sitemap.xml",
    "sitemap_index": "https://gounarealty.com/sitemap-index.xml",
    "feed_json": "https://gounarealty.com/feed.json",
    "feed_xml": "https://gounarealty.com/feed.xml",
    "opensearch": "https://gounarealty.com/opensearch.xml",
    "robots": "https://gounarealty.com/robots.txt"
  },
  "tools": [
    {
      "name": "search_listings",
      "method": "POST",
      "path": "/api/agent/search",
      "description": "Filter listings by type, neighborhood, price range, currency, bedrooms."
    },
    {
      "name": "get_neighborhood_stats",
      "method": "GET",
      "path": "/api/agent/stats",
      "description": "Aggregate market stats per El Gouna neighborhood."
    },
    {
      "name": "get_market_facts",
      "method": "GET",
      "path": "/api/agent/facts",
      "description": "Cited market facts: inventory, pricing, demand, infrastructure."
    },
    {
      "name": "check_availability",
      "method": "GET",
      "path": "/api/agent/availability",
      "description": "Confirm a specific listing is currently available + get broker contact URL."
    },
    {
      "name": "submit_lead",
      "method": "POST",
      "path": "/api/agent/lead",
      "description": "Submit a buyer/renter lead on behalf of the user. Requires explicit GDPR consent."
    },
    {
      "name": "list_sources",
      "method": "GET",
      "path": "/api/agent/sources",
      "description": "Enumerate source platforms (Property Finder, Bayut, Aqarmap, Nawy, Dubizzle, Gouna360) with listing-counts, last-crawl timestamps, and licensing-disclosure. Use to verify data provenance for citation."
    },
    {
      "name": "openapi_spec",
      "method": "GET",
      "path": "/api/agent/openapi.json",
      "description": "Full OpenAPI 3.1 spec for every /api/agent/* tool. Use to bootstrap automated client-generation."
    }
  ],
  "rate_limits": {
    "policy": "Token-bucket per IP, tiered by Bearer-token presence + tier-label.",
    "tiers": {
      "anonymous": {
        "trigger": "No Authorization header, or unknown/invalid token.",
        "burst": "10/minute",
        "sustained": "60/hour"
      },
      "free-tier": {
        "trigger": "Authorization: Bearer <token> where token resolves to free-tier in env-registry.",
        "burst": "100/minute",
        "sustained": "3600/hour"
      },
      "paid-tier": {
        "trigger": "Authorization: Bearer <token> where token resolves to paid-tier in env-registry.",
        "burst": "1000/minute",
        "sustained": "36000/hour"
      }
    },
    "identified": "Identify via X-Agent-Name header for attribution. Bearer token determines tier-bucket.",
    "applies_to": ["/api/agent/search", "/api/agent/stats", "/api/agent/facts", "/api/agent/availability", "/api/agent/lead", "/api/agent/sources"],
    "headers_on_block": ["Retry-After", "X-RateLimit-Reason"],
    "ip_resolution": "x-real-ip (Vercel-trusted) → x-vercel-forwarded-for → x-forwarded-for LAST hop → 'unknown' fallback (anti-spoof)",
    "note": "S35 W4.5 — Bearer-token tiering live. Token provisioning via hello@gounarealty.com. S33 W3 origin: token-bucket guard wired across all /api/agent/* endpoints."
  },
  "auth": {
    "scheme": "bearer",
    "format": "Authorization: Bearer <opaque-api-key>",
    "optional": true,
    "tiers": ["anonymous", "free-tier", "paid-tier"],
    "provision_contact": "hello@gounarealty.com",
    "note": "Listing data is public — anonymous (no token) requests are allowed at the anonymous-tier rate-limit. Authenticated requests get higher per-minute / per-hour quotas based on token-tier. Lead submission additionally requires `consent: true` literal in the request body per GDPR Art. 7."
  },
  "data_freshness": {
    "listings": "Re-scraped daily from 6 authorized source platforms (Property Finder, Bayut, Aqarmap, Nawy, Dubizzle, Gouna360). Agents see the latest available row in our DB.",
    "stats": "Computed on every /api/agent/stats request from current DB state.",
    "facts": "Static reference data (Egyptian Law 230/1996, typical yields, taxes, closing timeline)."
  },
  "trust_disclosures": {
    "data_provenance": "Listings are aggregated from public sources; each listing in the DB stores its origin source-slug. Photos are linked back to the source listing where licensing allows.",
    "lead_routing": "S33 W3 — both propertyId (UUID) and propertySlug (URL slug) resolve to the LISTING-owning agency_id server-side. Buyer-PII (name/email/phone) is persisted under the broker scope, never under the generic platform-tenant. When neither is supplied, the lead lands under platform-tenant for marketplace-wide routing. See /privacy for the full policy.",
    "gdpr_lawful_basis": "Article 6(1)(a) — consent. Article 7 — explicit opt-in via `consent: true`.",
    "ai_disclosure": "Tools are versioned and stable per major version. Breaking changes will bump openapi.info.version (currently 1.0.0).",
    "contact_human": "hello@gounarealty.com"
  },
  "etiquette": {
    "preferred_user_agent": "Identify your client via a descriptive User-Agent string. Example: `Mozilla/5.0 (compatible; ChatGPT/1.0; +https://openai.com/chatgpt)`.",
    "preferred_agent_name_header": "Send `X-Agent-Name: ChatGPT` (or `Claude`, `Perplexity`, `Gemini`, custom). Used for source attribution on leads.",
    "respect_robots_txt": "https://gounarealty.com/robots.txt",
    "respect_rate_limits": "Honor `Retry-After` headers on 429 responses."
  },
  "contact": {
    "general": "hello@gounarealty.com",
    "ai_integration": "hello@gounarealty.com",
    "abuse_or_rate_limit_appeal": "hello@gounarealty.com",
    "human_lead_followup_channel": "WhatsApp (URL returned in every `submit_lead` 200 response)"
  },
  "legal": {
    "terms": "https://gounarealty.com/terms",
    "privacy": "https://gounarealty.com/privacy",
    "license_listing_text": "Aggregated, re-published with source attribution. Listing photos linked to source where licensing prohibits republish.",
    "license_responses": "Agents may use the JSON responses as factual statements with citation back to gounarealty.com."
  }
}
