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
| Name | Required | Description | Default |
|---|---|---|---|
| videoIdOrUrl | No | Filter to assets for this video | |
| kind | No | Filter by asset kind | |
| limit | No |
Implementation Reference
- src/server/mcp-server.ts:1166-1207 (handler)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, }; } - src/server/mcp-server.ts:464-475 (schema)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, }, },