Skip to main content
Glama

youtube

Retrieve YouTube video transcripts and rich metadata (title, channel, duration). Search captions, list language tracks, and export in text, timestamped, SRT, VTT, or JSON format.

Instructions

YouTube transcript and metadata tool. Returns captions + rich metadata for any YouTube video. Actions: 'transcript' (captions only), 'metadata' (title/channel/duration/description/chapters only), 'info' (transcript + metadata in parallel - the common case), 'list_languages' (enumerate available caption tracks), 'search' (find a phrase within a transcript, returns timestamped matches with t= deeplinks). Primary fetch: youtube-transcript-api (fast, clean). Fallback: yt-dlp with json3 subtitles + VTT roll-up dedup. Format options: text (default, lowest tokens), timestamped, srt, vtt, json. Use harvest=True to write clean markdown under harvested/youtube/ for RAG ingestion. Accepts any URL shape (watch, youtu.be, shorts, live, embed) or bare 11-char video_id. Cached 1hr. Auto-paginates long transcripts; use segment_offset to continue from where the last response ended. For long podcasts, prefer harvest=True then retrieve() instead of loading full text into context.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoYouTube URL (any shape). Either url or video_id is required.
queryNoSearch phrase. Required for action='search'.
actionYesOperation to perform
formatNoTranscript output format. Default: text (lowest tokens).
harvestNoSave a markdown file under harvested/<harvest_dest>/ for RAG ingestion. Saves context tokens when working with long videos.
video_idNo11-char video ID (alternative to url).
languagesNoPreferred language codes in priority order, e.g. ['en', 'en-US']. Default ['en'].
force_ytdlpNoSkip primary path, go straight to yt-dlp (useful when IP-blocked or when primary returns stale data). Default: false.
harvest_destNoSubfolder under harvested/. Default: 'youtube/'.
max_segmentsNoMax segments to return. Default: auto-calculated to fit response budget.
rich_metadataNoUse yt-dlp for rich metadata (slower, full info) vs oEmbed (faster, title+channel+thumbnail only). Default: true.
segment_offsetNoStart from this segment index (0-based). Use next_offset from a previous paginated response to continue. Default: 0.
include_metadataNoFor info action, include metadata alongside transcript. Default: true.
Behavior5/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but the description fully discloses behavioral traits: fallback mechanism (primary vs yt-dlp), caching duration (1hr), auto-pagination with segment_offset, format defaults, and harvest behavior. No contradictions.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is a single dense paragraph covering many details. While all information is valuable, it could benefit from structuring (e.g., bullet points for actions) to improve scanability. It is not overly long but could be more concise.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness5/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 13 parameters and no output schema, the description thoroughly explains all aspects: actions, fallback, caching, pagination, harvest, format options, and search behavior. It is complete for an AI agent to select and invoke the tool correctly.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters5/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

With 100% schema description coverage, the baseline is 3, but the description adds substantial meaning: explains action semantics in detail, clarifies default formats and languages, describes harvest and pagination mechanics, and provides usage context for each parameter beyond the schema.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states 'YouTube transcript and metadata tool' and enumerates specific actions (transcript, metadata, info, list_languages, search) with explicit roles for each, effectively distinguishing the tool's purpose from siblings.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides usage guidance for each action, including best practices like using harvest=True for long podcasts and combining it with retrieve() for context efficiency. However, lacks explicit when-not-to-use guidance relative to sibling tools, though the tool's YouTube-specific scope naturally differentiates it.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/cutlerbenjamin1-cmd/web-explorer'

If you have feedback or need assistance with the MCP directory API, please join our Discord server