Skip to main content
Glama

get_video

Retrieve complete video details including snippet, status, statistics, and duration by providing the YouTube video ID.

Instructions

Fetch full details for one video by ID — snippet, status, statistics, duration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
video_idYesYouTube video ID (the part after v= in the URL)

Implementation Reference

  • The handler function for the 'get_video' tool. Calls client.getVideo(args.video_id) and returns the full video details as JSON.
    async (args) => {
      const data = await client.getVideo(args.video_id);
      const video = data.items[0];
      if (!video) {
        return { content: [{ type: "text" as const, text: `Video not found: ${args.video_id}` }] };
      }
      return {
        content: [
          { type: "text" as const, text: JSON.stringify(video, null, 2) },
        ],
      };
    },
  • Input schema for the 'get_video' tool. Defines a single required parameter: video_id (string).
    const getVideoSchema = {
      video_id: z.string().describe("YouTube video ID (the part after v= in the URL)"),
    };
  • Registration of the 'get_video' tool on the McpServer via server.tool() with schema and handler.
    server.tool(
      "get_video",
      "Fetch full details for one video by ID — snippet, status, statistics, duration.",
      getVideoSchema,
      async (args) => {
        const data = await client.getVideo(args.video_id);
        const video = data.items[0];
        if (!video) {
          return { content: [{ type: "text" as const, text: `Video not found: ${args.video_id}` }] };
        }
        return {
          content: [
            { type: "text" as const, text: JSON.stringify(video, null, 2) },
          ],
        };
      },
    );
  • Low-level API method getVideo() on YouTubeClient. Makes a GET request to YouTube Data API v3 /videos with snippet,status,statistics,contentDetails parts.
    getVideo(videoId: string): Promise<{ items: Video[] }> {
      return this.dataGet("/videos", {
        part: "snippet,status,statistics,contentDetails",
        id: videoId,
      });
    }
  • Type definition for VideoListResponse (return type of getVideo) and Video interface.
    export interface VideoListResponse {
      items: Video[];
      nextPageToken?: string;
      pageInfo?: { totalResults: number; resultsPerPage: number };
    }
Behavior3/5

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

No annotations are provided, so the description must convey behavior. It indicates a read operation by 'Fetch full details', but does not explicitly state it is read-only, idempotent, or what happens on failure (e.g., missing video). The listing of returned fields adds some transparency.

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 sentence that efficiently conveys the action and what is returned, with no extraneous words. It is appropriately sized for the tool's simplicity.

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

Completeness4/5

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

Given the simple single-parameter schema and no output schema, the description adequately covers the tool's purpose and output. It could mention error behavior or prerequisites (e.g., video must exist), but overall it provides enough context for this straightforward tool.

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

Parameters4/5

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

With 100% schema description coverage, the baseline is 3. The description adds practical guidance: 'the part after v= in the URL', which helps the agent correctly format the video_id parameter, going beyond the schema's own description.

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 'Fetch full details for one video by ID', specifying the resource (video) and action (fetch), and lists the exact details returned (snippet, status, statistics, duration). This distinguishes it from sibling tools like delete_video or update_video_metadata.

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

Usage Guidelines3/5

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

The description implies usage when needing full details for a single video but provides no explicit guidance on when to use this tool versus alternatives (e.g., list_my_videos for multiple videos) or conditions where it should not be used.

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/miller-joe/youtube-mcp'

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