Skip to main content
Glama

listMediaAssets

Retrieve locally stored media assets from YouTube intelligence data. Filter by video ID or asset type to view file paths, sizes, and metadata.

Instructions

List locally stored media assets. Filter by video or kind. Shows file paths, sizes, and manifest metadata.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
videoIdOrUrlNoFilter to assets for this video
kindNoFilter by asset kind
limitNo

Implementation Reference

  • Implementation of the 'listMediaAssets' tool handler, which uses the MediaStore to query and return assets based on optional videoId or kind filters.
    case "listMediaAssets": {
      const mediaStore = getMediaStore();
      const videoIdOrUrl = optionalString(args, "videoIdOrUrl");
      const kind = optionalString(args, "kind") as "video" | "audio" | "thumbnail" | "keyframe" | undefined;
      const limit = optionalNumber(args, "limit");
    
      let assets;
      if (videoIdOrUrl) {
        const videoId = parseVideoId(videoIdOrUrl) ?? videoIdOrUrl;
        assets = mediaStore.listAssetsForVideo(videoId);
        if (kind) assets = assets.filter((a) => a.kind === kind);
        if (limit) assets = assets.slice(0, limit);
      } else {
        assets = mediaStore.listAllAssets({ kind: kind as any, limit });
      }
    
      const stats = mediaStore.getStats();
      const provenance = { sourceTier: "none" as const, fetchedAt: new Date().toISOString(), fallbackDepth: 0 as const, partial: false };
      return {
        assets: assets.map((a) => ({
          assetId: a.assetId,
          videoId: a.videoId,
          kind: a.kind,
          filePath: a.filePath,
          fileName: a.fileName,
          fileSizeBytes: a.fileSizeBytes,
          mimeType: a.mimeType,
          timestampSec: a.timestampSec,
          width: a.width,
          height: a.height,
          durationSec: a.durationSec,
          createdAt: a.createdAt,
        })),
        stats: {
          totalAssets: stats.totalAssets,
          totalSizeBytes: stats.totalSizeBytes,
          videoCount: stats.videoCount,
          byKind: stats.byKind,
        },
        provenance,
      };
    }
  • Definition of the 'listMediaAssets' tool schema, including input validation parameters such as videoIdOrUrl, kind, and limit.
      name: "listMediaAssets",
      description: "List locally stored media assets. Filter by video or kind. Shows file paths, sizes, and manifest metadata.",
      inputSchema: {
        type: "object",
        properties: {
          videoIdOrUrl: { type: "string", description: "Filter to assets for this video" },
          kind: { type: "string", enum: ["video", "audio", "thumbnail", "keyframe"], description: "Filter by asset kind" },
          limit: { type: "number", minimum: 1, maximum: 500 },
        },
        additionalProperties: false,
      },
    },
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions what information is shown (file paths, sizes, manifest metadata) which is helpful, but doesn't address important behavioral aspects like whether this is a read-only operation, pagination behavior, performance characteristics, or authentication requirements. For a tool with no annotations, this leaves significant gaps.

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?

The description is efficiently structured in two sentences. The first states the core purpose and filtering capabilities, the second specifies what information is returned. There's no wasted language, though it could be slightly more detailed given the lack of annotations and output schema.

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

Completeness3/5

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

For a listing tool with 3 parameters, no annotations, and no output schema, the description provides basic but incomplete context. It covers the purpose and return information but lacks behavioral details, usage guidance, and comprehensive parameter context. The description is adequate as a starting point but leaves significant gaps that would hinder an agent's understanding.

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 67% (2 of 3 parameters have descriptions). The description adds value by mentioning filtering by 'video or kind' which aligns with the schema parameters, and specifies what information is returned. However, it doesn't provide additional context about parameter usage beyond what's in the schema descriptions. The baseline is appropriate given the partial schema 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 tool's purpose: 'List locally stored media assets' specifies the verb and resource. It distinguishes from siblings by focusing on local assets rather than remote operations like 'downloadAsset' or 'removeMediaAsset'. However, it doesn't explicitly differentiate from 'listCollections' or 'listCommentCollections' which also list things.

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?

The description provides no guidance on when to use this tool versus alternatives. It mentions filtering capabilities but doesn't explain when to choose this over other listing tools like 'listCollections' or when to use it versus search/analysis tools. No prerequisites or exclusions are mentioned.

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/rajanrengasamy/vidlens-mcp'

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