Skip to main content
Glama

removeCommentCollection

Delete a YouTube comment collection and its search index from the vidlens-mcp server to manage stored data.

Instructions

Delete a local comment collection and its search index.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionIdYes

Implementation Reference

  • The handler function `removeCollection` in `CommentKnowledgeBase` handles the removal of comment collections from the database.
    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(),
      };
    }
  • MCP tool registration/dispatch handler for "removeCommentCollection" in `mcp-server.ts`. Note: It calls `service.removeCommentCollection`, which is presumably an instance of `CommentKnowledgeBase`.
    case "removeCommentCollection":
      return service.removeCommentCollection({
        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 mentions deletion but doesn't specify if this action is reversible, requires specific permissions, or has side effects like affecting related data. This leaves critical behavioral traits unclear for a destructive operation.

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 that directly states the tool's function without unnecessary words. It is front-loaded with the key action and resource, making it easy to parse 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?

For a destructive tool with no annotations, no output schema, and minimal parameter guidance, the description is insufficient. It doesn't cover important aspects like confirmation prompts, error handling, or what happens to associated data, leaving gaps in understanding the tool's full context.

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 input schema has 0% description coverage, but the description doesn't add any semantic details about the 'collectionId' parameter, such as format or source. Since there's only one parameter, the baseline is 4, but the lack of any parameter-specific guidance reduces the score to 3.

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 action ('Delete') and the resource ('a local comment collection and its search index'), making the purpose unambiguous. However, it doesn't explicitly differentiate from sibling tools like 'removeCollection' or 'clearActiveCommentCollection', which might handle similar resources differently.

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?

No guidance is provided on when to use this tool versus alternatives like 'removeCollection' or 'clearActiveCommentCollection'. The description lacks context about prerequisites, such as whether the collection must be inactive or if data loss is permanent, leaving the agent to infer usage scenarios.

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