Skip to main content
Glama

mediaStoreHealth

Check local media store health by monitoring disk usage, counting assets, and verifying ffmpeg/yt-dlp availability for video processing workflows.

Instructions

Check health of the local media store: disk usage, asset counts, ffmpeg/yt-dlp availability.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Handler logic for 'mediaStoreHealth' inside the `executeTool` function within `src/server/mcp-server.ts`.
    case "mediaStoreHealth": {
      const mediaStore = getMediaStore();
      const thumbnailExtractor = getThumbnailExtractor();
      const mediaDownloader = getMediaDownloader();
      const stats = mediaStore.getStats();
      let ffmpegAvailable = false;
      let ffmpegVersion: string | undefined;
      let ytdlpAvailable = false;
      let ytdlpVersion: string | undefined;
    
      try {
        const probeResult = await thumbnailExtractor.probe();
        ffmpegAvailable = true;
        ffmpegVersion = probeResult.ffmpeg;
      } catch { /* unavailable */ }
      try {
        const probeResult = await mediaDownloader.probe();
        ytdlpAvailable = true;
        ytdlpVersion = probeResult.version;
      } catch { /* unavailable */ }
    
      const provenance = { sourceTier: "none" as const, fetchedAt: new Date().toISOString(), fallbackDepth: 0 as const, partial: false };
      return {
        dataDir: mediaStore.dataDir,
        assetsDir: mediaStore.assetsDir,
        stats: {
          totalAssets: stats.totalAssets,
          totalSizeBytes: stats.totalSizeBytes,
          videoCount: stats.videoCount,
          byKind: stats.byKind,
        },
        ffmpegAvailable,
        ffmpegVersion,
        ytdlpAvailable,
        ytdlpVersion,
        provenance,
      };
    }
  • Registration of the 'mediaStoreHealth' tool in the `tools` array within `src/server/mcp-server.ts`.
      name: "mediaStoreHealth",
      description: "Check health of the local media store: disk usage, asset counts, ffmpeg/yt-dlp availability.",
      inputSchema: {
        type: "object",
        properties: {},
        additionalProperties: false,
      },
    },

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