Skip to main content
Glama

removeMediaAsset

Delete stored media assets from the vidlens-mcp server. Remove specific assets by ID or clear all assets for a video to manage storage.

Instructions

Remove stored media assets. Specify assetId to remove one, or videoIdOrUrl to remove all assets for a video.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
assetIdNoSpecific asset ID to remove
videoIdOrUrlNoRemove all assets for this video
deleteFilesNoAlso delete files from disk (default true)

Implementation Reference

  • The handler for "removeMediaAsset" in src/server/mcp-server.ts uses MediaStore to remove assets by ID or video ID.
    case "removeMediaAsset": {
      const mediaStore = getMediaStore();
      const assetId = optionalString(args, "assetId");
      const videoIdOrUrl = optionalString(args, "videoIdOrUrl");
      const deleteFiles = readBoolean(args, "deleteFiles", true);
    
      if (!assetId && !videoIdOrUrl) {
        throw new Error("Provide either assetId or videoIdOrUrl to specify what to remove");
      }
    
      let removed = 0;
      let freedBytes = 0;
    
      if (assetId) {
        const asset = mediaStore.getAsset(assetId);
        if (asset) {
          freedBytes = asset.fileSizeBytes;
          mediaStore.removeAsset(assetId, deleteFiles);
          removed = 1;
        }
      } else if (videoIdOrUrl) {
        const videoId = parseVideoId(videoIdOrUrl) ?? videoIdOrUrl;
        const assets = mediaStore.listAssetsForVideo(videoId);
        freedBytes = assets.reduce((sum, a) => sum + a.fileSizeBytes, 0);
        removed = mediaStore.removeVideoAssets(videoId, deleteFiles);
      }
    
      const provenance = { sourceTier: "none" as const, fetchedAt: new Date().toISOString(), fallbackDepth: 0 as const, partial: false };
      return { removed, freedBytes, provenance };
    }
  • Registration of the "removeMediaAsset" tool including its input schema.
      name: "removeMediaAsset",
      description: "Remove stored media assets. Specify assetId to remove one, or videoIdOrUrl to remove all assets for a video.",
      inputSchema: {
        type: "object",
        properties: {
          assetId: { type: "string", description: "Specific asset ID to remove" },
          videoIdOrUrl: { type: "string", description: "Remove all assets for this video" },
          deleteFiles: { type: "boolean", description: "Also delete files from disk (default true)" },
        },
        additionalProperties: false,
      },
    },
Behavior2/5

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

No annotations are provided, so the description carries the full burden. It mentions removal but does not disclose critical behavioral traits such as whether the operation is reversible, what permissions are required, if it affects related data, or what happens on failure. For a destructive tool with zero annotation coverage, this is a significant gap in transparency.

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 two sentences with zero waste: the first states the purpose, and the second explains parameter usage. It is front-loaded and efficiently structured, making it easy to understand quickly.

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?

Given the tool's complexity (destructive operation with 3 parameters) and lack of annotations and output schema, the description is incomplete. It does not cover behavioral aspects like side effects, error handling, or return values, which are crucial for safe invocation. The description should do more to compensate for the missing structured data.

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%, so the schema already documents all parameters. The description adds marginal value by clarifying the mutual exclusivity of 'assetId' and 'videoIdOrUrl' (one vs. all assets), but it does not provide additional semantics beyond what the schema states. Baseline 3 is appropriate when schema coverage is high.

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?

The description clearly states the action ('Remove') and resource ('stored media assets'), distinguishing it from sibling tools like 'listMediaAssets' (read) and 'downloadAsset' (retrieve). It specifies the scope of removal (single asset vs. all assets for a video), making the purpose explicit and differentiated.

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

Usage Guidelines3/5

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

The description implies usage by describing two scenarios (removing one asset vs. all for a video), but it does not explicitly state when to use this tool over alternatives (e.g., no mention of prerequisites like asset existence or permissions) or when not to use it. It provides basic context but lacks explicit guidance on alternatives or exclusions.

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