get_video_transcript_preview
Retrieve a preview of a YouTube video transcript to decide if the full text is needed. Cached permanently with no API quota usage.
Instructions
Get a preview of a YouTube video transcript.
Retrieves the first N characters of a video transcript for quick preview.
Useful for deciding if you need the full transcript.
Cached permanently as transcript content doesn't change.
Args:
video_id: YouTube video ID (e.g., "dQw4w9WgXcQ")
language: Language code (e.g., "en"). If empty, uses first available
max_chars: Maximum characters to return (default: 2000)
Returns:
TranscriptPreview dictionary with:
- video_id, language, preview text
- total_length: Total characters in full transcript
- is_truncated: Whether preview is truncated
Example:
>>> preview = get_video_transcript_preview("nLwbNhSxLd4", max_chars=500)
>>> print(preview["preview"][:50])
"Welcome to this NixOS tutorial..."
Note:
- Uses no YouTube API quota
- Cached permanently in youtube.content namespace
- Use list_available_transcripts first to see language optionsCaching Behavior:
Parameters that accept reference strings can accept a
ref_idfrom a previous tool callLarge results return ref_id + preview; use get_cached_result to paginate
All responses include ref_id for future reference
Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution.
Full retrieval: Use get_cached_result(ref_id, full=True) to get the complete value.
Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| language | No | ||
| video_id | Yes | ||
| max_chars | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||