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
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/lib/knowledge-base.ts:348-356 (handler)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(), }; } - src/lib/types.ts:607-611 (schema)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; } - src/server/mcp-server.ts:1075-1076 (registration)Tool execution registration in the MCP server's executeTool switch statement. Routes the 'clearActiveCollection' tool call to service.clearActiveCollection().
case "clearActiveCollection": return service.clearActiveCollection(); - src/server/mcp-server.ts:287-294 (registration)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, }, },