Skip to main content
Glama

videos_getVideo

Retrieve detailed information about a YouTube video, such as metadata, by providing the video ID and specifying which parts to fetch using the MCP server's standardized interface.

Instructions

Get detailed information about a YouTube video

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
partsNoParts of the video to retrieve
videoIdYesThe YouTube video ID

Implementation Reference

  • Core handler function in VideoService that fetches detailed YouTube video information using the YouTube Data API v3 videos.list endpoint.
    async getVideo({ 
      videoId, 
      parts = ['snippet', 'contentDetails', 'statistics'] 
    }: VideoParams): Promise<any> {
      try {
        this.initialize();
        
        const response = await this.youtube.videos.list({
          part: parts,
          id: [videoId]
        });
        
        return response.data.items?.[0] || null;
      } catch (error) {
        throw new Error(`Failed to get video: ${error instanceof Error ? error.message : String(error)}`);
      }
    }
  • src/server.ts:42-62 (registration)
    Tool registration in the ListTools handler, including name, description, and input schema.
    {
        name: 'videos_getVideo',
        description: 'Get detailed information about a YouTube video',
        inputSchema: {
            type: 'object',
            properties: {
                videoId: {
                    type: 'string',
                    description: 'The YouTube video ID',
                },
                parts: {
                    type: 'array',
                    description: 'Parts of the video to retrieve',
                    items: {
                        type: 'string',
                    },
                },
            },
            required: ['videoId'],
        },
    },
  • Dispatch handler in MCP server that calls the VideoService.getVideo method and formats the response.
    case 'videos_getVideo': {
        const result = await videoService.getVideo(args as unknown as VideoParams);
        return {
            content: [{
                type: 'text',
                text: JSON.stringify(result, null, 2)
            }]
        };
    }
  • TypeScript interface defining the input parameters for the videos_getVideo tool.
    export interface VideoParams {
      videoId: string;
      parts?: string[];
    }
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. It states the tool 'gets' information, implying a read-only operation, but doesn't specify whether it requires authentication, has rate limits, returns structured data, or handles errors. For a tool with no annotation coverage, this leaves significant gaps in understanding its behavior beyond the basic action.

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 that directly states the tool's purpose without any fluff or redundancy. It's front-loaded with the core action and resource, making it easy to parse quickly. Every word earns its place by conveying essential information.

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's low complexity (2 parameters, no nested objects) and high schema coverage, the description is minimally adequate. However, with no annotations and no output schema, it doesn't provide enough context about what 'detailed information' includes in the response or any behavioral constraints. For a read operation, this is acceptable but leaves room for improvement in clarifying the output format.

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 schema description coverage is 100%, with clear descriptions for both parameters: 'parts' (parts of the video to retrieve) and 'videoId' (YouTube video ID). The description adds no additional semantic context beyond what the schema provides, such as examples of valid 'parts' values or how to obtain a 'videoId'. Since the schema does the heavy lifting, 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 verb 'Get' and resource 'detailed information about a YouTube video', making the purpose immediately understandable. It distinguishes from siblings like 'videos_searchVideos' (searching) and 'transcripts_getTranscript' (getting transcripts), though it doesn't explicitly mention these distinctions. However, it's not fully specific about what 'detailed information' includes compared to other video-related tools.

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. It doesn't mention when to choose this over 'videos_searchVideos' for finding videos, 'channels_listVideos' for listing videos from a channel, or 'transcripts_getTranscript' for getting transcript data. There's no context about prerequisites, such as needing a video ID versus searching by title.

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

Related 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/ZubeidHendricks/youtube-mcp-server'

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