Skip to main content
Glama

get_video_info

Extract video metadata from YouTube or TikTok URLs to access title, description, chapters, duration, channel, upload date, view count, and tags without playing the video.

Instructions

Fetch full metadata for a YouTube or TikTok video without playing it: title, description, chapters, duration, channel, upload date, view count, tags.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesYouTube or TikTok video URL

Implementation Reference

  • The tool 'get_video_info' is registered here and defines its logic, which invokes fetchVideoInfo.
    server.tool(
      'get_video_info',
      'Fetch full metadata for a YouTube or TikTok video without playing it: title, description, chapters, duration, channel, upload date, view count, tags.',
      { url: z.string().url().describe('YouTube or TikTok video URL') },
      async ({ url }) => {
        const urlErr = validateVideoUrl(url);
        if (urlErr) return errorResult(urlErr);
        const depErr = checkDeps();
        if (depErr) return errorResult(depErr);
    
        try {
          const info = await fetchVideoInfo(url);
          const chapters = (info.chapters as Array<Record<string, unknown>> | undefined)?.map((ch) => ({
            title: ch.title, start: ch.start_time, end: ch.end_time,
          })) || [];
    
          return textResult({
            title: info.title, channel: info.channel, upload_date: info.upload_date,
            duration: info.duration, view_count: info.view_count, like_count: info.like_count,
            description: info.description, tags: info.tags, chapters,
          });
        } catch (err) {
          return errorResult(`Error: ${err instanceof Error ? err.message : String(err)}`);
        }
      }
    );
  • The function 'fetchVideoInfo' performs the actual execution of yt-dlp to fetch video metadata.
    export function fetchVideoInfo(url: string): Promise<YtEntry> {
      return spawnYtDlp([
        url, '-J', '--no-playlist',
        '--cookies-from-browser', getBrowser(),
      ]).then((out) => JSON.parse(out));
    }
Behavior4/5

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

With no annotations or output schema, the description carries full behavioral burden and compensates well by enumerating return fields (title, description, chapters, duration, etc.). Implicitly indicates read-only operation via 'Fetch,' though explicit safety/disclaimers would strengthen further.

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?

Single, dense sentence front-loaded with the action. Every clause earns its place: platform scope, non-playback constraint, and comprehensive return field enumeration. No redundancy or filler.

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?

Compensates effectively for missing output schema by listing specific metadata fields returned. Would benefit from noting response format (JSON structure) or rate limit considerations, but field enumeration is sufficient for basic invocation decisions.

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% with the URL parameter fully described as 'YouTube or TikTok video URL.' Description does not add parameter-specific semantics beyond the schema, which warrants the baseline score for high-coverage schemas.

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?

Excellent specificity with 'Fetch full metadata' (verb + resource) and explicit platform scope (YouTube/TikTok). The phrase 'without playing it' effectively distinguishes from playback siblings like play_video, pause_video, and seek_video.

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?

Provides implied usage guidance through 'without playing it,' suggesting use when metadata is needed without playback. However, lacks explicit when-not-to-use guidance or distinction from sibling metadata tools like get_channel_videos or search_youtube.

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/ronantakizawa/social-video-mcp'

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