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(),
      };
    }
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 of behavioral disclosure. While it states the tool sets a default for searchComments, it doesn't describe what happens to the previous active collection, whether this change persists across sessions, if it requires specific permissions, or what the response looks like. For a configuration tool with zero annotation coverage, this is inadequate.

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 purpose and usage context. It's front-loaded with the core functionality and has no wasted words, making it easy for an agent to parse quickly.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness3/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given the tool's moderate complexity (configuration change with 1 parameter), no annotations, no output schema, and 0% schema description coverage, the description is minimally adequate. It explains what the tool does and its relationship to searchComments, but lacks details on behavior, parameter semantics, and output, leaving gaps for the agent to infer.

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 description doesn't add any parameter-specific information beyond what's implied by the tool's purpose. The input schema has 1 parameter with 0% description coverage, so the parameter 'collectionId' is undocumented. The description doesn't explain what a collectionId is, its format, or where to get valid values. However, with only 1 parameter, the baseline is higher than for tools with many undocumented parameters.

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 tool's purpose: 'Set the default comment collection that searchComments should focus on when collectionId is omitted.' It specifies the verb ('Set'), resource ('default comment collection'), and functional context. However, it doesn't explicitly differentiate from its sibling 'setActiveCollection' or 'clearActiveCommentCollection', which would be needed for a perfect score.

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

Usage Guidelines4/5

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

The description provides clear context for when to use this tool: when you want searchComments to focus on a specific collection by default. It mentions the alternative (omitting collectionId in searchComments) but doesn't explicitly state when NOT to use it or compare it to similar tools like setActiveCollection or clearActiveCommentCollection.

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