Skip to main content
Glama

setActiveCommentCollection

Set the default YouTube comment collection for focused searches when no specific collection is provided, streamlining comment analysis workflows.

Instructions

Set the default comment collection that searchComments should focus on when collectionId is omitted.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
collectionIdYes

Implementation Reference

  • The `setActiveCollection` method in `CommentKnowledgeBase` handles the logic for setting the active comment collection ID in the database state and returning the collection summary. Note: In the codebase, this is named `setActiveCollection`, which corresponds to the tool `setActiveCommentCollection` registered in `src/server/mcp-server.ts`.
    setActiveCollection(
      collectionId: string,
    ): SetActiveCommentCollectionOutput {
      const exists = this.db
        .prepare(
          "SELECT 1 FROM comment_collections WHERE collection_id = ?",
        )
        .get(collectionId);
      if (!exists) throw new Error(`Comment collection not found: ${collectionId}`);
    
      this.setAppState("active_comment_collection_id", collectionId);
      const summary = this.getCollectionSummary(collectionId);
      return {
        activeCollectionId: collectionId,
        collection: summary ?? undefined,
        provenance: localProvenance(),
      };
    }

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