Skip to main content
Glama
granitebps

YouTube MCP Server

by granitebps

get_video_transcript

Retrieve YouTube video transcripts or captions, manual or auto-generated, with timestamps, language selection, and pagination for AI agents.

Instructions

Get YouTube video transcript/captions (manual or auto-generated) with timestamps. Use 'lang' to pick a language code (e.g. 'en', 'id'), or omit it to get the first manual track (else the first auto-generated one); get_transcript_languages lists the codes. Returns both timestamped and plain text versions, paginated with startSegment/nextStartSegment. available=false with reason NO_CAPTIONS or LANGUAGE_UNAVAILABLE when captions are absent; access problems (ACCESS_BLOCKED etc.) are errors.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
langNoLanguage code for the transcript (e.g., 'en', 'id', 'ja'). Omit to get the first manual track, or the first auto-generated one if there is no manual track. get_transcript_languages lists the codes.
videoYesYouTube video URL or video ID
maxSegmentsNoMaximum number of transcript segments to return. 0 (default) returns as many as the server allows per response (currently 500). Use with startSegment for pagination.
startSegmentNoSegment index to start from (0-based). Use nextStartSegment from the previous response to paginate through long transcripts.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
reasonNoWhy available is false
hasMoreYes
messageNo
videoIdYes
segmentsYes
availableYes
plainTextYes
languageCodeYesLanguage of the returned track; the requested code when unavailable; null when none was requested and the video has no captions
startSegmentYes
totalSegmentsYes
isAutoGeneratedNoWhether the returned track is YouTube's automatic (ASR) captions; null if unknown
nextStartSegmentYes
returnedSegmentsYes
availableLanguagesNoLanguage codes that do exist, when reason is LANGUAGE_UNAVAILABLE

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed15 schema fields changedv1.1.0
    • removedInput schema / properties / lang / default
      Removed value: -"en"
    • changedInput schema / properties / lang / description
      Previous value: -"Language code for the transcript (e.g., 'en', 'id', 'ja')"New value: +"Language code for the transcript (e.g., 'en', 'id', 'ja'). Omit to get the first manual track, or the first auto-generated one if there is no manual track. get_transcript_languages lists the codes."
    • changedInput schema / properties / maxSegments / description
      Previous value: -"Maximum number of transcript segments to return. 0 (default) returns all segments. Use with startSegment for pagination."New value: +"Maximum number of transcript segments to return. 0 (default) returns as many as the server allows per response (currently 500). Use with startSegment for pagination."
    • addedInput schema / properties / maxSegments / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / maxSegments / type
      Previous value: -"number"New value: +"integer"
    • changedInput schema / properties / startSegment / description
      Previous value: -"Segment index to start from (0-based). Use with maxSegments to paginate through long transcripts."New value: +"Segment index to start from (0-based). Use nextStartSegment from the previous response to paginate through long transcripts."
    • addedInput schema / properties / startSegment / maximum
      Added value: +9007199254740991
    • changedInput schema / properties / startSegment / type
      Previous value: -"number"New value: +"integer"
    • addedOutput schema / properties / availableLanguages
      Added value: +{
      +  "description": "Language codes that do exist, when reason is LANGUAGE_UNAVAILABLE",
      +  "items": {
      +    "type": "string"
      +  },
      +  "type": "array"
      +}
    • addedOutput schema / properties / isAutoGenerated
      Added value: +{
      +  "description": "Whether the returned track is YouTube's automatic (ASR) captions; null if unknown",
      +  "type": [
      +    "boolean",
      +    "null"
      +  ]
      +}
    • addedOutput schema / properties / languageCode / description
      Added value: +"Language of the returned track; the requested code when unavailable; null when none was requested and the video has no captions"
    • changedOutput schema / properties / languageCode / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / reason
      Added value: +{
      +  "description": "Why available is false",
      +  "enum": [
      +    "NO_CAPTIONS",
      +    "LANGUAGE_UNAVAILABLE"
      +  ],
      +  "type": "string"
      +}
    • removedOutput schema / properties / segments / items / properties / durationSeconds / anyOf
      Removed value: -[
      -  {
      -    "type": "number"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]
    • addedOutput schema / properties / segments / items / properties / durationSeconds / type
      Added value: +[
      +  "number",
      +  "null"
      +]
  2. First observedv1.0.0

TDQS

A4.4/5.0
Behavior5/5

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

With no annotations, the description carries the full burden and does so well: it discloses the return shape (timestamped and plain text versions), the pagination mechanism (startSegment/nextStartSegment), the non-error failure mode (available=false with NO_CAPTIONS or LANGUAGE_UNAVAILABLE), and that access problems surface as errors. Only auth and rate-limit behavior are unstated.

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?

Front-loaded with the core purpose and packed with useful detail in a few dense semicolon-joined clauses. Nothing is wasted, though the single run-on sentence is harder to scan than separated bullets would be.

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 4-parameter read tool with an output schema and no annotations, the description covers purpose, language selection, pagination, and both failure modes. An agent has everything needed to call it correctly and interpret the response.

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

Parameters3/5

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

Schema coverage is 100%, so the baseline is 3. The description largely restates what the schema already documents (lang omission behavior, pagination with startSegment), adding no syntax or format details beyond it.

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?

States a specific verb and resource ('Get YouTube video transcript/captions') plus the distinguishing scope (manual or auto-generated, with timestamps). It also names the sibling get_transcript_languages, so an agent can route between the two without opening either schema.

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?

Explains the selection rule for 'lang' (provide a code, omit for first manual track else first auto-generated) and points to get_transcript_languages for valid codes. It gives clear context but no explicit exclusions against the other siblings (get_video_info, get_video_comments).

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