Skip to main content
Glama

get_video_info

Extract technical details from video files, including format, duration, resolution, and codec information, to analyze media properties.

Instructions

Get detailed information about a video file

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
filePathYesPath to the video file

Implementation Reference

  • Handler logic for 'get_video_info' tool: validates the filePath argument and delegates to getVideoInfo helper function, returning the info as text content.
    case "get_video_info": {
      const filePath = validatePath(String(args?.filePath), true);
      const info = await getVideoInfo(filePath);
      return {
        content: [{
          type: "text",
          text: info
        }]
      };
    }
  • Core implementation: uses ffprobe to extract detailed video information (format and streams) in JSON format, with path validation and error handling.
    export async function getVideoInfo(filePath: string): Promise<string> {
      try {
        validatePath(filePath, true);
        console.log(`Getting video info for: ${filePath}`);
        const { stdout, stderr } = await execPromise(`ffprobe -v error -show_format -show_streams -print_format json "${filePath}"`);
        return stdout || stderr;
      } catch (error: any) {
        console.error("FFprobe error:", error.message);
        if (error.stderr) {
          return error.stderr;
        }
        throw new Error(`FFprobe error: ${error.message}`);
      }
    }
  • Tool schema definition: specifies name, description, and input schema requiring a 'filePath' string.
    {
      name: "get_video_info",
      description: "Get detailed information about a video file",
      inputSchema: {
        type: "object",
        properties: {
          filePath: {
            type: "string",
            description: "Path to the video file"
          }
        },
        required: ["filePath"]
      }
    },
  • src/index.ts:46-50 (registration)
    Registers all tools including 'get_video_info' by exposing toolDefinitions in the ListToolsRequest handler.
    server.setRequestHandler(ListToolsRequestSchema, async () => {
      return {
        tools: toolDefinitions
      };
    });
  • src/index.ts:56-68 (registration)
    Registers the CallToolRequest handler which dispatches to handleToolCall based on tool name, enabling execution of 'get_video_info'.
    server.setRequestHandler(CallToolRequestSchema, async (request) => {
      try {
        return await handleToolCall(request.params.name, request.params.arguments);
      } catch (error: any) {
        console.error("Tool execution error:", error.message);
        return {
          content: [{
            type: "text",
            text: `Error: ${error.message}`
          }]
        };
      }
    });
Behavior2/5

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

With no annotations provided, the description carries full burden but only states what the tool does, not how it behaves. It doesn't disclose whether this is a read-only operation, what format the information is returned in, potential errors, or performance characteristics.

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, efficient sentence that states the core purpose without unnecessary words. It's appropriately sized for a simple tool with one parameter.

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

Completeness2/5

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

For a tool with no annotations and no output schema, the description is insufficient. It doesn't explain what 'detailed information' includes, the return format, or error conditions. Given the lack of structured metadata, the description should provide more behavioral context.

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% with the single parameter 'filePath' well-documented in the schema. The description doesn't add any additional parameter context beyond what's already in the structured schema, meeting the baseline for high coverage.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose4/5

Does the description clearly state what the tool does and how it differs from similar tools?

The description clearly states the verb 'Get' and resource 'detailed information about a video file', making the purpose unambiguous. However, it doesn't differentiate from potential sibling tools that might also retrieve video information with different scopes or details.

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

Usage Guidelines2/5

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

No guidance is provided on when to use this tool versus alternatives like 'extract_frames' or 'extract_audio' which might also provide video information. The description lacks context about prerequisites or typical use cases.

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/sworddut/mcp-ffmpeg-helper'

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