Skip to main content
Glama
jkawamoto

YouTube Transcript MCP Server

get_video_info

Retrieve video metadata from YouTube URLs to extract and process transcripts for integration with Goose CLI or Desktop applications.

Instructions

Retrieves the video information.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesThe URL of the YouTube video

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
titleYesTitle of the video
durationYesDuration of the video
uploaderYesUploader of the video
descriptionYesDescription of the video
upload_dateYesUpload date of the video

Implementation Reference

  • The MCP tool handler function for 'get_video_info', decorated with @mcp.tool(), which delegates to the _get_video_info helper.
    @mcp.tool()
    def get_video_info(
        ctx: Context[ServerSession, AppContext],
        url: str = Field(description="The URL of the YouTube video"),
    ) -> VideoInfo:
        """Retrieves the video information."""
        return _get_video_info(ctx.request_context.lifespan_context, url)
  • Cached helper function that performs the core logic of extracting video information using yt_dlp and constructing the VideoInfo object.
    @lru_cache
    def _get_video_info(ctx: AppContext, video_url: str) -> VideoInfo:
        res = ctx.dlp.extract_info(video_url, download=False)
        upload_date, duration = _parse_time_info(res["upload_date"], res["timestamp"], res["duration"])
        return VideoInfo(
            title=res["title"],
            description=res["description"],
            uploader=res["uploader"],
            upload_date=upload_date,
            duration=duration,
        )
  • Pydantic BaseModel defining the output schema for the get_video_info tool.
    class VideoInfo(BaseModel):
        """Video information."""
    
        title: str = Field(description="Title of the video")
        description: str = Field(description="Description of the video")
        uploader: str = Field(description="Uploader of the video")
        upload_date: AwareDatetime = Field(description="Upload date of the video")
        duration: str = Field(description="Duration of the video")
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. 'Retrieves' implies a read-only operation, but it doesn't specify authentication needs, rate limits, error conditions, or what happens if the URL is invalid. For a tool with no annotation coverage, this is a significant gap in behavioral context.

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 a single, efficient sentence with no wasted words. It's front-loaded with the core action ('retrieves'), making it easy to parse. However, it could be more informative without sacrificing conciseness.

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

Completeness3/5

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

Given the tool has an output schema (which covers return values), no annotations, and a simple parameter with full schema coverage, the description is minimally adequate. It states the basic purpose but lacks behavioral details and sibling differentiation, leaving gaps in completeness for effective tool selection.

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, clearly documenting the single 'url' parameter as a YouTube video URL. The description doesn't add any meaning beyond what the schema provides (e.g., it doesn't clarify URL format or constraints). With 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.

Purpose3/5

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

The description states the verb 'retrieves' and resource 'video information', which is clear but vague. It doesn't specify what information is retrieved (metadata, statistics, etc.) or differentiate from sibling tools like get_timed_transcript and get_transcript that also retrieve video-related data. The purpose is understandable but lacks specificity.

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?

No guidance is provided on when to use this tool versus the sibling tools (get_timed_transcript, get_transcript). The description doesn't mention alternatives, prerequisites, or exclusions. It's a basic statement of function with no contextual usage information.

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/jkawamoto/mcp-youtube-transcript'

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