Skip to main content
Glama

youtube-transcript-extractor

Extract text transcripts from YouTube videos to analyze and work with video content directly.

Instructions

Extracts the transcript of a YouTube video.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
inputYesa youtube video url

Implementation Reference

  • index.ts:20-35 (handler)
    Handler function that extracts the transcript from a YouTube video by parsing the video ID from the input URL, fetching the transcript using YoutubeTranscript, joining the text parts, and returning it as text content.
    async ({ input }) => {
      const videoData = getVideoId(input);
      const output = await YoutubeTranscript.fetchTranscript(videoData.id as string).then((transcript: any) => {
        const text = transcript.map((t: any) => t.text).join(' ');
        return text;
      });
    
      return {
        content: [
          {
            type: "text",
            text: output,
          },
        ],
      };
    }
  • Zod schema defining the input as a string representing a YouTube video URL.
    {
      input: z.string().describe("a youtube video url"),
    },
  • index.ts:14-36 (registration)
    Registers the 'youtube-transcript-extractor' tool with the MCP server, including name, description, input schema, and handler function.
    server.tool(
      "youtube-transcript-extractor",
      "Extracts the transcript of a YouTube video.",
      {
        input: z.string().describe("a youtube video url"),
      },
      async ({ input }) => {
        const videoData = getVideoId(input);
        const output = await YoutubeTranscript.fetchTranscript(videoData.id as string).then((transcript: any) => {
          const text = transcript.map((t: any) => t.text).join(' ');
          return text;
        });
    
        return {
          content: [
            {
              type: "text",
              text: output,
            },
          ],
        };
      }
    );
Behavior2/5

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

No annotations are provided, so the description carries the full burden of behavioral disclosure. While 'Extracts' implies a read operation, it lacks details on permissions, rate limits, error handling, or output format. This leaves significant gaps in understanding the tool's behavior beyond its basic function.

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 a single, efficient sentence: 'Extracts the transcript of a YouTube video.' It is front-loaded with the core purpose and contains no unnecessary words, making it highly concise and well-structured.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description is incomplete. It lacks information on behavioral traits (e.g., error cases, rate limits) and output details (e.g., transcript format, structure). While concise, it does not provide enough context for an agent to use the tool effectively beyond basic invocation.

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?

The input schema has 100% description coverage, with the parameter 'input' documented as 'a youtube video url.' The description does not add any meaning beyond this, such as URL format examples or validation rules. Given the high schema coverage, the baseline score of 3 is appropriate.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Extracts the transcript of a YouTube video.' It specifies the verb ('Extracts') and resource ('transcript of a YouTube video'), making the function unambiguous. However, with no sibling tools mentioned, there's no opportunity to differentiate from alternatives, preventing a perfect score.

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

Usage Guidelines2/5

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

The description provides no guidance on when to use this tool versus alternatives, prerequisites, or limitations. It simply states what the tool does without context for its application, leaving the agent to infer usage scenarios independently.

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/MalikElate/yt-description-mcp'

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