> This page is for Agent Handler.

> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.merge.dev/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.merge.dev/_mcp/server.

# YouTube

**Authentication:** OAuth. See [Magic Link](/merge-agent-handler/features/magic-link) for the runtime auth flow, or [Application credentials](/merge-agent-handler/admin-setup/add-oauth-credentials) to bring your own OAuth app.

## Sample use cases

* Pull view counts and watch time for the channel's last 10 videos.
* Find videos uploaded in the last 30 days with engagement below average.
* Search YouTube for videos covering our latest product launch.

## Available Tools

#### list\_channels

List YouTube channels by ID, username, or 'mine' flag. Use page\_token from page\_info for next page.

#### update\_channel

Update YouTube channel metadata (description, keywords, language, country). Requires OAuth2.

#### list\_comment\_threads

List top-level comment threads for a video or channel. Use page\_token from page\_info for next page.

#### create\_comment\_thread

Post a new top-level comment on a YouTube video. Requires OAuth2.

#### list\_comments

List replies to a comment thread. Use page\_token from page\_info for next page.

#### create\_comment

Reply to an existing YouTube comment thread. Requires OAuth2.

#### update\_comment

Edit a YouTube comment's text. Requires OAuth2.

#### delete\_comment

Delete a YouTube comment by ID. This action is irreversible. Requires OAuth2.

#### list\_playlist\_items

List items in a YouTube playlist with pagination. Use page\_token from page\_info for next page.

#### add\_playlist\_item

Add a video to a YouTube playlist at an optional position. Requires OAuth2.

#### update\_playlist\_item

Update a playlist item's position or note. Requires OAuth2.

#### remove\_playlist\_item

Remove an item from a YouTube playlist by playlist item ID. Requires OAuth2.

#### list\_playlists

List YouTube playlists by ID, channel ID, or 'mine' flag. Use page\_token from page\_info for next page.

#### create\_playlist

Create a new YouTube playlist with title, description, and privacy setting. Requires OAuth2.

#### update\_playlist

Update YouTube playlist metadata (title, description, privacy). Requires OAuth2.

#### delete\_playlist

Delete a YouTube playlist by ID. This action is irreversible. Requires OAuth2.

#### search

Search YouTube for videos, channels, or playlists. Costs 100 quota units per call. Use page\_token for next page.

#### list\_subscriptions

List YouTube subscriptions by channel ID or 'mine' flag. Use page\_token from page\_info for next page.

#### create\_subscription

Subscribe to a YouTube channel. Requires OAuth2.

#### delete\_subscription

Unsubscribe from a YouTube channel by subscription ID. Requires OAuth2.

#### list\_videos

List YouTube videos by ID, chart (mostPopular), or user rating. At least one filter (id, chart, or my\_rating) is required. Use page\_token from page\_info for next page.

#### get\_video

Get a YouTube video by ID with specified parts (snippet, contentDetails, statistics, status).

#### insert\_video

Create video metadata (title, description, tags, privacy). Note: file upload requires resumable upload protocol.

#### update\_video

Update video metadata (title, description, tags, privacy, category). Requires OAuth2.

#### delete\_video

Delete a YouTube video by ID. This action is irreversible. Requires OAuth2.

#### rate\_video

Rate a YouTube video (like, dislike, or none to remove rating). Requires OAuth2.