Skip to main content
Glama
YouTube MCP Server

YouTube MCP Server

by granitebps

get_video_info

Retrieves YouTube video metadata including title, channel, description, duration, views, likes, comments, upload date, and tags from a URL or video ID.

Instructions

Get YouTube video metadata: title, channel, description, duration (text and seconds), views, likes, comment count, upload date, and tags. Unknown values are null. Served by the provider selected with YT_PROVIDER (see get_server_info). Input: YouTube URL or video ID. Errors carry a code (e.g. ACCESS_BLOCKED, VIDEO_UNAVAILABLE, TIMEOUT) in _meta["youtube-mcp/error"] and as a [CODE] text prefix.

Input Schema

NameRequiredDescriptionDefault
videoYesYouTube video URL or video ID

Output Schema

NameRequiredDescriptionDefault
tagsYes
titleYes
videoIdYes
durationYesHuman-readable duration, e.g. '1m 21s'; null when unknown or live
channelIdYes
likeCountYes
viewCountYes
uploadedAtYesinnertube provider: display text such as 'Sep 14, 2017' or 'Premiered May 27, 2020'. api provider: ISO 8601 timestamp
channelNameYes
descriptionYesnull when YouTube did not provide a description; empty string when it is empty
commentCountYes
thumbnailUrlYes
durationSecondsYesDuration in seconds; null when unknown or live

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed14 schema fields changedv1.1.0
    • changedOutput schema / properties / channelId / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / channelName / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / commentCount / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / description / description
      Added value: +"null when YouTube did not provide a description; empty string when it is empty"
    • changedOutput schema / properties / description / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / duration / description
      Added value: +"Human-readable duration, e.g. '1m 21s'; null when unknown or live"
    • changedOutput schema / properties / duration / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / durationSeconds
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 9007199254740991,
      +      "minimum": 1,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "description": "Duration in seconds; null when unknown or live"
      +}
    • changedOutput schema / properties / likeCount / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / thumbnailUrl / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • addedOutput schema / properties / uploadedAt / description
      Added value: +"innertube provider: display text such as 'Sep 14, 2017' or 'Premiered May 27, 2020'. api provider: ISO 8601 timestamp"
    • changedOutput schema / properties / uploadedAt / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / properties / viewCount / type
      Previous value: -"string"New value: +[
      +  "string",
      +  "null"
      +]
    • changedOutput schema / required
      Previous value: -[
      -  "videoId",
      -  "title",
      -  "description",
      -  "channelName",
      -  "channelId",
      -  "uploadedAt",
      -  "duration",
      -  "viewCount",
      -  "likeCount",
      -  "commentCount",
      -  "tags",
      -  "thumbnailUrl"
      -]New value: +[
      +  "videoId",
      +  "title",
      +  "description",
      +  "channelName",
      +  "channelId",
      +  "uploadedAt",
      +  "duration",
      +  "durationSeconds",
      +  "viewCount",
      +  "likeCount",
      +  "commentCount",
      +  "tags",
      +  "thumbnailUrl"
      +]
  2. First observedv1.0.0

TDQS

A4.1/5.0
Behavior4/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 well: it discloses that unknown values come back as null, that results depend on a provider chosen via YT_PROVIDER (pointing to get_server_info), and that failures surface a code such as ACCESS_BLOCKED/VIDEO_UNAVAILABLE/TIMEOUT in both _meta["youtube-mcp/error"] and a [CODE] text prefix. It omits rate-limit, caching, or quota behavior, which keeps it short of a 5.

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 returned fields, then the input contract, then error semantics — a sensible order with no filler. It is dense, but the only slightly expendable material is the redundant enumeration of return fields, which the output schema already covers.

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?

For a single-parameter read tool with an output schema, the description covers input format, null semantics, provider dependency, and error signaling, which is enough to call and interpret it. Remaining gaps (auth/API-key requirement, rate limits, whether ACCESS_BLOCKED is retryable) are minor given an output schema exists.

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 description coverage is 100% and there is a single parameter, so the baseline is 3. The description's 'YouTube URL or video ID' simply restates the schema's own wording with no added syntax, accepted URL forms, or examples (e.g. youtu.be vs watch?v=).

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 ('Get') plus resource ('YouTube video metadata') and then enumerates the exact fields returned (title, channel, duration, views, likes, comment count, upload date, tags), which cleanly separates it from get_video_comments, get_video_transcript, and search_youtube. An agent can identify the tool without opening the 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?

The field enumeration and the 'Input: YouTube URL or video ID' line make the use case clear: fetch metadata for one known video. However, it never explicitly says when-not to use it or names an alternative (e.g. search_youtube for discovery, get_video_comments for engagement detail), so guidance is contextual rather than prescriptive.

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