Skip to main content
Glama

yt_video_details

Read-onlyIdempotent

Fetch public metadata and owner-authorized retention diagnostics for one YouTube video ID, including audience retention curves, drop-off cliffs, peer percentiles, and traffic sources.

Instructions

Fetch public video metadata plus owner-authorized YouTube Analytics retention diagnostics for a single 11-character video_id: 100-point elapsedVideoTimeRatio audience retention curve, exact MM:SS drop-off cliffs, relativeRetentionPerformance peer percentiles, and traffic source breakdown. Retention curve and traffic diagnostics require channel-owner OAuth2 (a studioDiagnosisError explains a missing scope). Public page metadata (title, views, likes) is scraped only when force_public=true or MATEAI_YT_PUBLIC_SCRAPE=1. When words_or_script_path is provided, maps each retention drop-off cliff onto the exact spoken words at that timestamp.

Input Schema

NameRequiredDescriptionDefault
video_idYes11-character YouTube video or Short ID (e.g. 'I9c6W135VZk').
force_publicNoOpt in to scraping the public watch page for title/views/likes. Only set when the user asks for it.
words_or_script_pathNoOptional local filesystem path to a readable Whisper words.js or JSON word-timestamp file used to align retention drop-off cliffs with spoken words.

Output Schema

NameRequiredDescriptionDefault
titleNo
videoIdYes
likeCountNo
viewCountNo
studioDiagnosisNo

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changedv0.3.0
    • addedInput schema / properties / force_public
      Added value: +{
      +  "default": false,
      +  "description": "Opt in to scraping the public watch page for title/views/likes. Only set when the user asks for it.",
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changedv0.2.0
    • changedInput schema / properties / video_id / description
      Previous value: -"11-character YouTube video ID (e.g. 'I9c6W135VZk')."New value: +"11-character YouTube video or Short ID (e.g. 'I9c6W135VZk')."
    • addedInput schema / properties / video_id / pattern
      Added value: +"^[A-Za-z0-9_-]{11}$"
    • changedInput schema / properties / words_or_script_path / description
      Previous value: -"Optional path to Whisper words.js / JSON timing file to map drop-off cliffs to exact spoken words."New value: +"Optional local filesystem path to a readable Whisper words.js or JSON word-timestamp file used to align retention drop-off cliffs with spoken words."
    • changedOutput schema / (root)
      Previous value: -nullNew value: +{
      +  "properties": {
      +    "likeCount": {
      +      "type": "integer"
      +    },
      +    "studioDiagnosis": {
      +      "type": "object"
      +    },
      +    "title": {
      +      "type": "string"
      +    },
      +    "videoId": {
      +      "type": "string"
      +    },
      +    "viewCount": {
      +      "type": "integer"
      +    }
      +  },
      +  "required": [
      +    "videoId"
      +  ],
      +  "type": "object"
      +}
  3. First observedv0.1.0

TDQS

A4.4/5.0
Behavior5/5

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

Goes well beyond readOnly/idempotent annotations by disclosing the OAuth2 scope requirement, the studioDiagnosisError raised on a missing scope, and the fact that scraping is opt-in via a flag or environment variable. These are exactly the operational traits an agent needs before calling.

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-loads the core purpose and keeps every clause informative, but the enumerated list of return metrics is verbose and partly duplicates the output schema. Still tight for the amount of conditional behavior it must convey.

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

Completeness5/5

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

Covers identification, auth requirements, the opt-in gate for scraping, the optional words-alignment mode, and the error surface. With an output schema present, return value documentation is not required, so nothing critical is missing.

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 coverage is 100%, so the schema already explains video_id format, the force_public opt-in, and the words file purpose. The description largely restates those semantics in behavioral terms (what the words file unlocks, why scraping is gated) without adding format, defaults, or edge-case detail beyond the schema.

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 ('Fetch') and a precisely bounded resource: metadata plus owner-authorized Analytics retention diagnostics for a single 11-character video_id. The output artifacts (retention curve, drop-off cliffs, peer percentiles, traffic sources) make it unmistakable against siblings like yt_channel_snapshot or yt_update_video.

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?

Gives clear preconditions for use: retention/traffic diagnostics need channel-owner OAuth2, and public page scraping happens only when force_public=true or the env var is set. It does not, however, explicitly contrast itself with sibling tools or state when a caller should prefer yt_channel_snapshot instead.

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