Skip to main content
Glama
l4b4r4b4b4

YouTube MCP Server

by l4b4r4b4b4

get_transcript_chunk

Retrieve a subset of transcript entries to paginate through large YouTube transcripts. Iterate entry-by-entry using start index and chunk size.

Instructions

Get a chunk of transcript entries for pagination.

Retrieves a subset of transcript entries for large transcripts.
Useful for iterating through transcripts entry-by-entry.
Cached permanently as transcript content doesn't change.

Args:
    video_id: YouTube video ID (e.g., "dQw4w9WgXcQ")
    start_index: Starting entry index (0-based, default: 0)
    chunk_size: Number of entries to return (default: 50)
    language: Language code (e.g., "en"). If empty, uses first available

Returns:
    TranscriptChunk dictionary with:
    - video_id, language, start_index, chunk_size
    - entries: List of transcript entries in this chunk
    - total_entries: Total entries in full transcript
    - has_more: Whether more entries available after this chunk

Example:
    >>> chunk = get_transcript_chunk("nLwbNhSxLd4", start_index=0, chunk_size=10)
    >>> print(len(chunk["entries"]))
    10
    >>> print(chunk["has_more"])
    True
    >>> # Get next chunk
    >>> chunk2 = get_transcript_chunk("nLwbNhSxLd4", start_index=10, chunk_size=10)

Note:
    - Uses no YouTube API quota
    - Cached permanently in youtube.content namespace
    - Use for iterating through large transcripts

Caching Behavior:

  • Parameters that accept reference strings can accept a ref_id from a previous tool call

  • Large 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

TableJSON Schema
NameRequiredDescriptionDefault
languageNo
video_idYes
chunk_sizeNo
start_indexNo

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior5/5

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

With no annotations provided, the description carries the full burden and excels by disclosing key behaviors: caching ('Cached permanently'), no API quota usage, and the return structure including pagination details. It also notes that transcript content does not change, justifying the caching.

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

Conciseness4/5

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

The description is well-structured with a clear lead sentence, parameter docs, return format, example, and notes. However, the generic 'Caching Behavior' section adds verbosity; it could be more concise without losing clarity.

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 the output schema exists, the description still adds valuable context about the return fields (e.g., 'has_more'), pagination pattern, caching, and usage for large transcripts. It is complete for a pagination tool with 4 parameters.

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?

Schema coverage is 0%, but the description compensates fully by explaining each parameter with examples ('video_id' example), defaults, and behavior ('language' defaults to first available). It also details the return fields, adding significant meaning 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 the tool retrieves a 'chunk' of transcript entries for pagination. This distinguishes it from siblings like 'get_full_transcript' and 'get_video_transcript_preview' by focusing on iterative access over large transcripts.

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?

The description explicitly says it is 'useful for iterating through transcripts entry-by-entry' and 'for large transcripts', providing clear context for when to use it. However, it does not explicitly mention when not to use it or name alternatives like 'get_full_transcript' for full retrieval.

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/l4b4r4b4b4/yt-api-mcp'

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