Skip to main content
Glama

get_metadata

Read-onlyIdempotent

Retrieve video metadata, comments, chapters, and AI summary from a Loom or direct video URL without downloading or extracting frames. Get structured information faster than full video analysis.

Instructions

Get video metadata, comments, chapters, and AI summary from a video URL.

Returns structured metadata without downloading the video or extracting frames. Faster than analyze_video when you only need metadata.

Supports: Loom (loom.com/share/...) and direct video URLs (.mp4, .webm, .mov).

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
urlYesVideo URL (Loom share link or direct mp4/webm URL)

Implementation Reference

  • The main handler that registers and implements the get_metadata tool. Accepts a video URL, resolves the adapter, then fetches metadata, comments, chapters, and AI summary in parallel via the adapter. Returns all data as JSON.
    export function registerGetMetadata(server: FastMCP): void {
      server.addTool({
        name: 'get_metadata',
        description: `Get video metadata, comments, chapters, and AI summary from a video URL.
    
    Returns structured metadata without downloading the video or extracting frames.
    Faster than analyze_video when you only need metadata.
    
    Supports: Loom (loom.com/share/...) and direct video URLs (.mp4, .webm, .mov).`,
        parameters: GetMetadataSchema,
        annotations: {
          title: 'Get Metadata',
          readOnlyHint: true,
          destructiveHint: false,
          idempotentHint: true,
          openWorldHint: true,
        },
        execute: async (args, { reportProgress }) => {
          const progress = createProgressReporter(reportProgress);
          const { url } = args;
    
          let adapter;
          try {
            adapter = getAdapter(url);
          } catch (error) {
            if (error instanceof UserError) throw error;
            throw new UserError(`Failed to detect video platform for URL: ${url}`);
          }
    
          const warnings: string[] = [];
    
          await progress(0, 'Fetching video metadata...');
    
          const [metadata, comments, chapters, aiSummary] = await Promise.all([
            adapter.getMetadata(url).catch((e: unknown) => {
              warnings.push(`Failed to fetch metadata: ${e instanceof Error ? e.message : String(e)}`);
              return {
                platform: adapter.name as 'loom' | 'direct' | 'unknown',
                title: 'Unknown',
                duration: 0,
                durationFormatted: '0:00',
                url,
              };
            }),
            adapter.getComments(url).catch((e: unknown) => {
              warnings.push(`Failed to fetch comments: ${e instanceof Error ? e.message : String(e)}`);
              return [];
            }),
            adapter.getChapters(url).catch(() => []),
            adapter.getAiSummary(url).catch(() => null),
          ]);
    
          await progress(100, 'Metadata fetched');
    
          return {
            content: [
              {
                type: 'text' as const,
                text: JSON.stringify({ metadata, comments, chapters, aiSummary, warnings }, null, 2),
              },
            ],
          };
        },
      });
    }
  • Zod schema for the input parameter: requires a single 'url' field that must be a valid URL string.
    const GetMetadataSchema = z.object({
      url: z.string().url().describe('Video URL (Loom share link or direct mp4/webm URL)'),
    });
  • src/server.ts:65-65 (registration)
    Registration of the get_metadata tool in the MCP server setup.
    registerGetMetadata(server);
  • Loom adapter's getMetadata implementation: fetches video details via Loom GraphQL API.
    async getMetadata(url: string): Promise<IVideoMetadata> {
      const videoId = extractLoomId(url);
    
      const data = await loomGraphQL<LoomVideoData>(
        `query GetVideo($videoId: ID!, $password: String) {
          getVideo(id: $videoId, password: $password) {
            ... on RegularUserVideo {
              __typename id name description playable_duration
              owner { display_name }
              createdAt
            }
            ... on PrivateVideo {
              __typename id
            }
          }
        }`,
        { videoId, password: null },
      );
    
      const video = data?.getVideo;
    
      return {
        platform: 'loom',
        title: video?.name ?? 'Untitled Loom Video',
        description: video?.description ?? undefined,
        duration: video?.playable_duration ?? 0,
        durationFormatted: formatDuration(video?.playable_duration ?? 0),
        url,
      };
    }
  • Direct adapter's getMetadata implementation: extracts filename from URL, returns basic metadata (duration unknown for direct URLs).
    async getMetadata(url: string): Promise<IVideoMetadata> {
      const filename = getFilenameFromUrl(url);
      return {
        platform: 'direct',
        title: filename,
        duration: 0,
        durationFormatted: '0:00',
        url,
      };
    }
Behavior4/5

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

Annotations already declare readOnlyHint=true and idempotentHint=true. Description adds valuable context: no download of video, no frame extraction, and supported URL formats. No contradictions.

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?

Three short paragraphs, each serving a distinct purpose: what it does, how it differs from alternatives, and supported inputs. No redundant phrases; every sentence is necessary and informative.

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?

For a simple tool with one parameter and no output schema, the description covers all needed context: purpose, usage guidance, URL support, and performance comparison. No gaps remain.

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

Parameters4/5

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

Schema coverage is 100% with one parameter. Description adds meaning beyond schema by specifying the format ('Video URL (Loom share link or direct mp4/webm URL)') and giving examples in parentheses, which helps agents construct valid inputs.

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?

Description uses specific verb 'get' and clearly states the resource: metadata, comments, chapters, AI summary from video URL. Distinguishes from sibling tools like analyze_video by stating it returns metadata without downloading or extracting frames.

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

Usage Guidelines5/5

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

Explicitly tells when to use this tool ('when you only need metadata') and compares to alternative ('Faster than analyze_video'). Also specifies supported URL types (Loom shares, direct video URLs).

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/guimatheus92/mcp-video-analyzer'

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