yt_channel_snapshot
Fetch live YouTube channel statistics, recent long-form videos, and Shorts metrics, then write an HTML dashboard and JSON snapshot cache for local channel reporting.
Instructions
Fetch live YouTube channel statistics, recent long-form videos, and Shorts metrics, and write an updated local report.html dashboard and channel_snapshot.json cache on disk. When YouTube OAuth2 credentials are present (and force_public is false), queries YouTube Data API v3 (~3 quota units) and YouTube Analytics API v2 for private owner metrics (averageViewPercentage, swipedAwayRate, engagedViews, estimatedMinutesWatched, subscribersGained); public page scraping is opt-in only (force_public=true or MATEAI_YT_PUBLIC_SCRAPE=1); without OAuth or opt-in it returns setup instructions. Overwrites report.html idempotently on each run.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "yt_channel_snapshot"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| handle | No | YouTube channel handle (with or without leading '@', e.g. '@mateai-c6m'). Defaults to '@mateai-c6m'. | @mateai-c6m |
| force_public | No | Opt in to public page scraping for this call (bypasses OAuth2; public views/likes only). Only set when the user asks for it. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | Yes | ||
| videos | Yes | ||
| channel | Yes | ||
| dashboardPath | Yes |