[
  {
    "name": "yt_search",
    "description": "Search YouTube for videos, channels, or playlists. Returns snippet info including title, description, channel, thumbnails, and publish date.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "_apiKey": {
          "type": "string",
          "description": "YouTube Data API v3 key from Google Cloud Console"
        },
        "query": {
          "type": "string",
          "description": "Search term"
        },
        "type": {
          "type": "string",
          "description": "Resource type to search: \"video\", \"channel\", or \"playlist\" (default: \"video\")"
        },
        "max_results": {
          "type": "number",
          "description": "Number of results to return (default 10, max 50)"
        },
        "channel_id": {
          "type": "string",
          "description": "Filter results to a specific channel ID"
        },
        "order": {
          "type": "string",
          "description": "Sort order: \"date\", \"rating\", \"relevance\", or \"viewCount\" (default: \"relevance\")"
        },
        "published_after": {
          "type": "string",
          "description": "Filter results published after this ISO 8601 date (e.g. \"2024-01-01T00:00:00Z\")"
        }
      },
      "required": [
        "_apiKey",
        "query"
      ]
    }
  },
  {
    "name": "yt_video_details",
    "description": "Get detailed information about one or more YouTube videos including title, description, channel, duration, view/like/comment counts, and tags.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "_apiKey": {
          "type": "string",
          "description": "YouTube Data API v3 key from Google Cloud Console"
        },
        "video_id": {
          "type": "string",
          "description": "Video ID or comma-separated list of video IDs (max 50)"
        }
      },
      "required": [
        "_apiKey",
        "video_id"
      ]
    }
  },
  {
    "name": "yt_channel_details",
    "description": "Get YouTube channel information and statistics including subscriber count, video count, view count, description, and custom URL.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "_apiKey": {
          "type": "string",
          "description": "YouTube Data API v3 key from Google Cloud Console"
        },
        "channel_id": {
          "type": "string",
          "description": "Channel ID (starts with UC...)"
        },
        "username": {
          "type": "string",
          "description": "Channel username (alternative to channel_id)"
        }
      },
      "required": [
        "_apiKey"
      ]
    }
  },
  {
    "name": "yt_channel_videos",
    "description": "List recent videos from a YouTube channel, ordered by date. Returns video ID, title, description, and publish date.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "_apiKey": {
          "type": "string",
          "description": "YouTube Data API v3 key from Google Cloud Console"
        },
        "channel_id": {
          "type": "string",
          "description": "Channel ID to list videos from"
        },
        "max_results": {
          "type": "number",
          "description": "Number of videos to return (default 10, max 50)"
        },
        "published_after": {
          "type": "string",
          "description": "Filter videos published after this ISO 8601 date"
        },
        "published_before": {
          "type": "string",
          "description": "Filter videos published before this ISO 8601 date"
        }
      },
      "required": [
        "_apiKey",
        "channel_id"
      ]
    }
  },
  {
    "name": "yt_video_comments",
    "description": "Get top-level comment threads on a YouTube video. Returns author, text, like count, and publish date.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "_apiKey": {
          "type": "string",
          "description": "YouTube Data API v3 key from Google Cloud Console"
        },
        "video_id": {
          "type": "string",
          "description": "Video ID to fetch comments for"
        },
        "max_results": {
          "type": "number",
          "description": "Number of comment threads to return (default 20, max 100)"
        },
        "order": {
          "type": "string",
          "description": "Sort order: \"time\" or \"relevance\" (default: \"relevance\")"
        }
      },
      "required": [
        "_apiKey",
        "video_id"
      ]
    }
  },
  {
    "name": "yt_video_transcript",
    "description": "Get the transcript (captions) of a YouTube video: timestamped segments plus the joined text, the caption language, and whether the track is auto-generated. No API key needed. Use it to summarize, quote or search what is said in a video. Long videos are paged: pass the returned next_start_seconds as start_seconds to continue. A video with no captions returns a captions_unavailable error, never an empty transcript.",
    "inputSchema": {
      "type": "object",
      "properties": {
        "video_id": {
          "type": "string",
          "description": "YouTube video ID (e.g. \"dQw4w9WgXcQ\") or a full youtube.com / youtu.be URL"
        },
        "lang": {
          "type": "string",
          "description": "Caption language code (e.g. \"en\", \"fr\", \"pt-BR\"). \"en\" also matches \"en-US\". Default: the video's default caption track. If the video has no track in this language the error lists the ones it has."
        },
        "start_seconds": {
          "type": "number",
          "description": "Skip segments that start before this many seconds (for paging through long videos). Default 0."
        },
        "max_chars": {
          "type": "number",
          "description": "Stop after this many characters of transcript text (default 50000, max 200000)."
        }
      },
      "required": [
        "video_id"
      ]
    }
  }
]
