Skip to main content
Glama

removeCollection

Delete a local transcript collection and its search index to manage storage and organize YouTube intelligence data.

Instructions

Delete a local transcript collection and its search index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionIdYes

Implementation Reference

  • Handler logic to delete a collection from the database, clear its associated data (chunks/videos), and update the application state if the collection was active.
    removeCollection(collectionId: string): RemoveCommentCollectionOutput {
      const existing = this.db
        .prepare(
          "SELECT 1 FROM comment_collections WHERE collection_id = ?",
        )
        .get(collectionId);
      if (!existing) {
        return {
          removed: false,
          collectionId,
          chunksDeleted: 0,
          videosDeleted: 0,
          clearedActiveCollection: false,
          provenance: localProvenance(),
        };
      }
    
      const chunkRow = this.db
        .prepare(
          "SELECT COUNT(*) AS count FROM comment_chunks WHERE collection_id = ?",
        )
        .get(collectionId) as { count: number } | undefined;
      const videoRow = this.db
        .prepare(
          "SELECT COUNT(*) AS count FROM comment_collection_videos WHERE collection_id = ?",
        )
        .get(collectionId) as { count: number } | undefined;
    
      const wasActive = this.getActiveCollectionId() === collectionId;
      this.db
        .prepare("DELETE FROM comment_collections WHERE collection_id = ?")
        .run(collectionId);
      if (wasActive) {
        this.deleteAppState("active_comment_collection_id");
      }
    
      return {
        removed: true,
        collectionId,
        chunksDeleted: Number(chunkRow?.count ?? 0),
        videosDeleted: Number(videoRow?.count ?? 0),
        clearedActiveCollection: wasActive,
        provenance: localProvenance(),
      };
    }
  • Registration and dispatching of the "removeCommentCollection" tool in the MCP server request handler. Note that while searching for "removeCollection", the actual tool registered is "removeCommentCollection". Wait, the prompt asked for "removeCollection". Let me re-verify. Oh, looking at the tools list again, I see both "removeCollection" (index 335) and "removeCommentCollection" (index 649). They are different. Checking the registration for "removeCollection".
    case "removeCommentCollection":
      return service.removeCommentCollection({
        collectionId: readString(args, "collectionId"),
      });
  • Registration of the "removeCollection" tool handler in the MCP server.
    case "removeCollection":
      return service.removeCollection({
        collectionId: readString(args, "collectionId"),
      });
Behavior2/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It states the tool deletes a collection and its index, implying a destructive operation, but does not cover permissions, reversibility, side effects, or error handling. This is inadequate for a mutation tool with zero annotation coverage.

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 a single, efficient sentence with zero waste—it directly states the tool's purpose without unnecessary words. It is appropriately sized and front-loaded for quick comprehension.

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 destructive nature, lack of annotations, no output schema, and low schema coverage, the description is incomplete. It fails to address critical aspects like confirmation prompts, success/failure responses, or dependencies, making it insufficient for safe and effective use.

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?

The schema has 0% description coverage, so the description must compensate. It implies the 'collectionId' parameter identifies the collection to delete, adding some meaning beyond the bare schema. However, it does not specify format, constraints, or examples, leaving gaps in parameter understanding.

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 ('Delete') and the target ('a local transcript collection and its search index'), which is specific and unambiguous. It distinguishes from siblings like 'removeCommentCollection' by specifying the type of collection being removed.

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 like 'clearActiveCollection' or 'removeCommentCollection', nor does it mention prerequisites or conditions for use. It lacks explicit when/when-not instructions or named alternatives.

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