Skip to main content
Glama

Youtube

youtube
Read-only

Retrieve video metadata, searchable transcripts with timestamps, channel/playlist uploads, and free-text search results from a single endpoint.

Instructions

Fetch YouTube content via yt-dlp and youtube-transcript-api.

Use this for YouTube lookups when web_fetch_incisive doesn't apply: structured metadata + description for a video, a rendered caption transcript with timing and search, a flat listing of recent uploads for a channel or items for a playlist, or a YouTube-wide search by free-text query.

Actions: video, transcript, channel, playlist, search.

PARAMETER SPLIT: video / transcript / channel / playlist take url=; search takes query=.

Query formats:

  • video: full YouTube URL (watch?v=, youtu.be/, shorts/, clip/, embed/, or v/)

  • transcript: same URL formats as video; combine with languages=, timestamps=, search=, windows=, start_seconds=, end_seconds=, order=

  • channel: /@handle, /channel/UC..., /c/, /user/. The bare channel URL returns the channel's available tabs (Videos, Shorts, Live, etc.). Append /videos, /shorts, /streams, /playlists, or /podcasts to list the actual entries within that tab.

  • playlist: /playlist?list=...

  • search: free-text query (passed to yt-dlp's ytsearch{N}: routing).

Transcript actions:

  • Default (no search/windows/range): full transcript in the requested timestamps= shape.

  • search="query": BM25 over window text, with optional time-range filter.

  • start_seconds/end_seconds: half-open time-range filter.

  • windows=[i, ...]: explicit retrieval by window index. Mutually exclusive with search and time-range filters.

  • order=score (default) or order=time: BM25 vs chronological ordering.

Transcript timestamps= modes:

  • compact (default): sparse anchors at ~30s windows plus inline markers for unusually long pauses; each source caption cue on its own line. Hybrid shape that preserves citation precision while keeping token cost low.

  • absolute: per-line [MM:SS] prefix on every cue.

  • none: flat text with no timing.

  • structured: YAML list of {t, d, text} triples for machine consumers.

Auto-generated captions lack punctuation and capitalization; the 'transcript_kind' field in frontmatter signals which to expect. The chunking strategy adapts: punctuated input gets sentence-aware window cuts; unpunctuated input falls back to pause-aware time windows.

Channel, playlist, and search listings use yt-dlp's flat extraction, returning stub entries with id, title, duration, and view count. Set limit= to control how many entries (default 30, max 200). When a bare channel URL is passed, the response surfaces the channel's tab list with a frontmatter hint nudging toward /videos, /shorts, etc. — pick the right tab and resubmit. Search results match what the user would see browsing youtube.com/results?search_query=... since yt-dlp routes through the same Innertube endpoint.

A 'video' call returns the description. Comments live on the dedicated youtube_comments — the video frontmatter surfaces a 'see_also' pointing there when the channel reports a non-zero comment count, so callers can pivot when they want to read the conversation.

Music URLs (music.youtube.com) are out of scope and will be handled by a sibling tool.

No authentication required. May fail with bot-detection or PoTokenRequired errors; residential connections fare best. The fallback workaround when blocked is to set HTTPS_PROXY to a residential proxy endpoint.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlNoYouTube URL for video / transcript / channel / playlist actions. video / transcript: watch, youtu.be, shorts, clip, embed, v/. channel: /@handle, /channel/UC..., /c/, /user/, optionally with a /videos, /shorts, /streams, /playlists tab suffix. playlist: /playlist?list=... Not used for action='search' (use 'query=' instead).
limitNoFor 'channel' / 'playlist': maximum number of entries to return. Default 30, capped at 200. yt-dlp's flat extraction respects this server-side via playlistend, so large channels don't pull every upload.
orderNoFor 'transcript' search: 'score' (default) ranks by BM25 relevance; 'time' sorts by start_seconds ascending. Only meaningful when a query or range is set.score
queryNoFor action='search': free-text query string. yt-dlp's ytsearch{N}: routing handles URL encoding.
actionYesThe operation to perform. video: fetch video metadata + description from a YouTube URL. transcript: fetch the caption transcript for a video URL, with optional BM25 search, time-range filtering, and explicit window retrieval. channel: list a channel's recent uploads. playlist: list a playlist's items. search: search YouTube for videos matching a free-text query.
searchNoFor 'transcript': BM25 query over window text. Mutually exclusive with 'windows='. Combine with start_seconds / end_seconds to restrict by time range.
chapterNoFor 'transcript': scope search to a chapter by title. Parsed via the same query syntax as 'search=' so partial matches and phrases work (e.g. chapter='intro' matches 'Introduction'). Composes with search and time-range filters; incompatible with 'windows='. Available chapters are listed in the frontmatter 'chapters:' field of a non-filtered transcript fetch.
windowsNoFor 'transcript': retrieve specific window indices (0-based). Mutually exclusive with 'search=' and incompatible with time-range filters. Out-of-range indices are reported in frontmatter rather than erroring.
languagesNoFor 'transcript': caption language preference list, tried in order (e.g. ['en', 'en-US']). Defaults to ['en'].
timestampsNoFor 'transcript': output shape. 'compact' (default) emits sparse anchors plus inline markers for unusually long pauses, with each source caption cue on its own line. 'absolute' emits a per-line [MM:SS] prefix on every cue. 'none' returns flat text with no timing. 'structured' returns a YAML list of {t, d, text} triples for machine consumers.compact
end_secondsNoFor 'transcript': upper bound on a time-range filter, in seconds. Half-open: a window starting exactly at end_seconds does not match.
start_secondsNoFor 'transcript': lower bound on a time-range filter, in seconds. Windows whose interval overlaps [start_seconds, end_seconds) match. Combine with 'search=' for a time-restricted query.
Behavior5/5

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

Beyond the readOnlyHint annotation, the description discloses authentication requirements, bot-detection/PoTokenRequired failure modes, residential-proxy fallback, flat-extraction stub behavior, and adaptive chunking behavior. It adds rich operational context without contradicting the read-only annotation.

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

Conciseness5/5

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

The description is long but tightly structured with labeled sections and bullet-like lists. It is front-loaded with the core purpose and action split, and every sentence conveys actionable operational detail rather than filler.

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?

For a 12-parameter tool with no output schema, the description is remarkably complete: it covers return shapes (stub entries, frontmatter fields, transcript formats), error conditions, workarounds, and hints for callers (e.g., the see_also pivot to youtube_comments). An agent has enough context to select and invoke the tool correctly in most scenarios.

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?

Even though the schema covers all 12 parameters, the description substantially adds meaning: the action/url/query split, URL format variants per action, mutual exclusivity (e.g., windows vs search), defaults, timestamp modes, and how limit interacts with yt-dlp's playlistend. This goes far beyond the schema's field descriptions.

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 opens with a specific verb-plus-resource statement ('Fetch YouTube content via yt-dlp and youtube-transcript-api') and enumerates five concrete actions (video, transcript, channel, playlist, search) with distinct outputs. It clearly differentiates from sibling tools like youtube_comments and web_fetch_incisive.

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

Usage Guidelines5/5

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

It explicitly states when to use this tool ('Use this for YouTube lookups when web_fetch_incisive doesn't apply') and lists the exact use cases it covers. It also identifies exclusions and alternatives: comments are handled by the dedicated youtube_comments tool and music.youtube.com URLs are out of scope for a sibling tool.

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/blightbow/parkour-mcp'

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