Skip to main content
Glama
l4b4r4b4b4

YouTube MCP Server

by l4b4r4b4b4

get_video_details

Retrieve comprehensive YouTube video metadata including title, description, statistics, duration, tags, and channel details by providing the video ID.

Instructions

Get detailed information about a YouTube video.

Retrieves comprehensive video metadata including title, description,
statistics (views, likes, comments), duration, tags, and channel info.
Cached for 24 hours to minimize API quota usage.

Args:
    video_id: YouTube video ID (from URL or search results, e.g., "dQw4w9WgXcQ")

Returns:
    Video details dictionary with:
    - title, description, video_id, url, thumbnail
    - view_count, like_count, comment_count
    - duration (ISO 8601 format like "PT15M30S")
    - tags, channel_title, published_at

Example:
    >>> details = _get_video_details("nLwbNhSxLd4")
    >>> print(details["title"])
    "Full NixOS Guide"

Note:
    - Costs 1 quota unit per request (100x cheaper than search)
    - Cached for 24h in youtube.api namespace
    - Use after search to get full details

Caching Behavior:

  • Parameters that accept reference strings can accept a ref_id from a previous tool call

  • Large results return ref_id + preview; use get_cached_result to paginate

  • All responses include ref_id for future reference

Ref input compatibility: Support depends on the tool's input schema/validation. Some strictly typed parameters may reject string ref_ids before resolution.

Full retrieval: Use get_cached_result(ref_id, full=True) to get the complete value.

Preview Size: server default. Override per-call with get_cached_result(ref_id, max_size=...).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
video_idYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Behavior4/5

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

Discloses caching (24h), quota cost (1 unit), and retrieval behavior. No contradictions with annotations (none provided). However, the generic caching behavior section may introduce ambiguity about ref_id usage.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Front-loaded main description is concise, but the appended caching behavior section is verbose and generic, adding unnecessary length. Could be trimmed to focus on tool-specific details.

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?

Covers all essential aspects: purpose, parameters, return fields, quota, caching, and usage order. Output schema exists, so detailed return format is appropriate. Slightly less complete on edge cases like auth or error handling.

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

Parameters5/5

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

Adds significant meaning beyond schema: explains video_id format (from URL/search), provides example, and clarifies usage context. Schema coverage is 0% but description fully compensates.

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?

Clearly states 'Get detailed information about a YouTube video' and lists specific metadata. Distinguishes from search with quota cost comparison and usage order.

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?

Explicitly advises 'Use after search to get full details' and notes caching and quota. Does not list alternative tools or specific when-not-to-use scenarios, but context is clear.

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/l4b4r4b4b4/yt-api-mcp'

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