Skip to main content
Glama

clearActiveCollection

Clear the active collection to expand transcript searches across all video collections instead of limiting results to one.

Instructions

Clear the active collection so transcript search fans back out across all collections. [~instant]

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • Main handler implementation for clearActiveCollection tool. Retrieves the previous active collection ID, deletes the active_collection_id from app state, and returns a result object with cleared status, previousActiveCollectionId, and provenance.
    clearActiveCollection(): ClearActiveCollectionOutput {
      const previousActiveCollectionId = this.getActiveCollectionId();
      this.deleteAppState("active_collection_id");
      return {
        cleared: Boolean(previousActiveCollectionId),
        previousActiveCollectionId: previousActiveCollectionId ?? undefined,
        provenance: localProvenance(),
      };
    }
  • TypeScript interface defining the output schema for clearActiveCollection. Specifies the shape of the returned object with cleared boolean, optional previousActiveCollectionId, and provenance.
    export interface ClearActiveCollectionOutput {
      cleared: boolean;
      previousActiveCollectionId?: string;
      provenance: Provenance;
    }
  • Tool execution registration in the MCP server's executeTool switch statement. Routes the 'clearActiveCollection' tool call to service.clearActiveCollection().
    case "clearActiveCollection":
      return service.clearActiveCollection();
  • MCP tool definition/schema registration. Defines the tool name, description, and input schema (empty object since no parameters required).
      name: "clearActiveCollection",
      description: "Clear the active collection so transcript search fans back out across all collections. [~instant]",
      inputSchema: {
        type: "object",
        properties: {},
        additionalProperties: false,
      },
    },
Behavior3/5

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

With no annotations provided, the description carries the full burden. It adds valuable behavioral context via '[~instant]' (performance characteristic) and explains the search scope expansion effect. However, it omits safety details (whether this deletes data vs. just deselecting) and doesn't clarify if this affects search types beyond transcripts.

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 a brief performance annotation. It is front-loaded with the action ('Clear the active collection') and contains no redundant or wasted words.

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

Completeness4/5

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

For a simple state-reset tool with no parameters and no output schema, the description is reasonably complete. It explains the functional effect on the primary use case (transcript search). A minor gap is the lack of explicit clarification that this operation doesn't destroy the collection data (distinguishing it from removeCollection), but the naming convention makes this reasonably clear.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters4/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

The input schema has zero parameters, establishing a baseline score of 4. The description appropriately doesn't invent parameters, and the empty schema with additionalProperties: false is self-documenting.

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 specific action ('Clear the active collection') and its functional consequence ('so transcript search fans back out across all collections'). It effectively distinguishes this from siblings like setActiveCollection (inverse operation) and clearActiveCommentCollection (mentions 'transcript' specifically vs. comments).

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 context through the explanation of the fan-out effect, suggesting when you'd want to use this (to broaden search scope). However, it lacks explicit 'when to use' guidance or direct comparison to setActiveCollection as the alternative for filtering.

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/thatsrajan/vidlens-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server