{
  "function_declarations": [
    {
      "name": "search_program",
      "description": "Search Romanian TV programs across 254 channels by free-text query, channel, category and natural timeframe (now, tonight, tomorrow, weekend, primetime, a date, or an ISO range). Times are Europe/Bucharest. Maps to GET/POST https://tv.madeinro.eu/api/v1/search.",
      "parameters": {
        "type": "object",
        "properties": {
          "query": {
            "type": "string",
            "minLength": 1,
            "maxLength": 200,
            "description": "Free text to match against program title (case/diacritic-insensitive)"
          },
          "channel": {
            "type": "string",
            "description": "Channel id, display name, or alias (e.g. \"PRO TV\", \"tv-pro-tv\", \"HBO\")"
          },
          "category": {
            "type": "string",
            "description": "Channel category: Generaliste | Știri | Sport | Filme & Seriale | Documentare | Copii | Muzică | Altele"
          },
          "timeframe": {
            "type": "string",
            "default": "now",
            "description": "Natural time reference: now | tonight | tomorrow | weekend | primetime | today | YYYY-MM-DD | ISO instant | ISO range \"A/B\""
          },
          "exclude_news": {
            "type": "boolean",
            "default": false
          },
          "limit": {
            "type": "integer",
            "minimum": 1,
            "maximum": 50,
            "default": 10
          }
        }
      }
    },
    {
      "name": "concierge",
      "description": "Decide what to watch for a free-time window: returns ONE primary pick (TV program or streaming title) with confidence, reasoning and up to 3 alternatives. Built-in anti-noise filtering and dedup. Times are Europe/Bucharest. Maps to GET/POST https://tv.madeinro.eu/api/v1/concierge.",
      "parameters": {
        "type": "object",
        "properties": {
          "window": {
            "type": "object",
            "properties": {
              "start": {
                "type": "string",
                "default": "now",
                "description": "\"now\" | \"HH:MM\" (Europe/Bucharest) | ISO instant"
              },
              "duration_min": {
                "type": "integer",
                "minimum": 30,
                "maximum": 360,
                "default": 120
              }
            },
            "description": "Explicit window. Skips lookahead."
          },
          "duration_hours": {
            "type": "number",
            "minimum": 0.5,
            "maximum": 6,
            "description": "Shorthand when window is absent; starts at now."
          },
          "mood": {
            "type": "string",
            "description": "obosit | vesel | concentrat | romantic | familie | captivant (RO/EN aliases accepted)"
          },
          "exclude_categories": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "politica",
                "reality",
                "talkshow",
                "stiri"
              ]
            },
            "default": [
              "politica",
              "reality",
              "talkshow",
              "stiri"
            ],
            "description": "Anti-noise filter (default: all four)."
          },
          "exclude_keywords": {
            "type": "array",
            "items": {
              "type": "string"
            }
          },
          "sources": {
            "type": "array",
            "items": {
              "type": "string",
              "enum": [
                "tv",
                "streaming"
              ]
            },
            "default": [
              "tv",
              "streaming"
            ]
          },
          "max_alternatives": {
            "type": "integer",
            "minimum": 0,
            "maximum": 5,
            "default": 3
          },
          "risk_aversion": {
            "type": "string",
            "enum": [
              "low",
              "high"
            ],
            "default": "low",
            "description": "low = 3 alternatives, high = none"
          },
          "allow_pauses": {
            "type": "boolean",
            "default": true
          },
          "min_rating": {
            "type": "number",
            "minimum": 0,
            "maximum": 10,
            "default": 0
          },
          "prefer": {
            "type": "array",
            "items": {
              "type": "string"
            }
          }
        }
      }
    },
    {
      "name": "get_now_next",
      "description": "Current and next program per Romanian TV channel. Times are Europe/Bucharest. Maps to GET https://tv.madeinro.eu/api/v1/now-next."
    },
    {
      "name": "get_prime_time",
      "description": "Tonight’s prime-time lineup (about 20:00–23:00 Europe/Bucharest). Maps to GET https://tv.madeinro.eu/api/v1/prime-time."
    },
    {
      "name": "get_tonight",
      "description": "What’s worth watching tonight on Romanian TV (Europe/Bucharest evening). Maps to GET https://tv.madeinro.eu/api/v1/tonight."
    },
    {
      "name": "get_important_today",
      "description": "Major broadcasts today — sports finals and big events — with importance tiers. Maps to GET https://tv.madeinro.eu/api/v1/important-today."
    },
    {
      "name": "get_title_details",
      "description": "Details for one movie/series/program, including streaming availability in Romania (display \"Streaming availability data: JustWatch\" when showing platforms). Maps to GET https://tv.madeinro.eu/api/v1/titles/{id}.",
      "parameters": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "description": "Title id from the titles index or search results — rotv_title_<n> or plain numeric (e.g. rotv_title_585)."
          }
        },
        "required": [
          "id"
        ]
      }
    },
    {
      "name": "get_recommendations",
      "description": "Ranked recommendations for today across Romanian TV and streaming. Maps to GET https://tv.madeinro.eu/api/v1/recommendations."
    },
    {
      "name": "get_evening_plan",
      "description": "A pre-built evening viewing plan for tonight (ordered items, Europe/Bucharest). Maps to GET https://tv.madeinro.eu/api/v1/evening-plan."
    },
    {
      "name": "check_freshness",
      "description": "Age of the underlying EPG/streaming data (EPG refreshes 4x/day, feeds every 15 min). Call when answer freshness matters. Maps to GET https://tv.madeinro.eu/api/v1/freshness."
    }
  ]
}
