listCollections
List local transcript collections with search focus and video counts to manage YouTube intelligence data.
Instructions
List local transcript collections, active search focus, and indexed video/chunk counts.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| includeVideoList | No |
Implementation Reference
- src/server/mcp-server.ts:986-990 (handler)The tool handler in the MCP server dispatch logic for "listCollections", which delegates to the YouTubeService.
case "listCollections": return service.listCollections({ includeVideoList: optionalBoolean(args, "includeVideoList"), }); - src/lib/knowledge-base.ts:272-290 (handler)The actual database implementation of the listCollections tool, fetching collections from the SQLite database.
listCollections(includeVideoList = false): ListCollectionsOutput { const rows = this.db.prepare(` SELECT c.collection_id, c.label, c.source_type, c.source_ref, c.source_title, c.source_channel_title, c.created_at, c.updated_at, (SELECT algorithm FROM collection_models m WHERE m.collection_id = c.collection_id) AS algorithm, COALESCE((SELECT COUNT(*) FROM collection_videos v WHERE v.collection_id = c.collection_id), 0) AS video_count, COALESCE((SELECT COUNT(*) FROM transcript_chunks ch WHERE ch.collection_id = c.collection_id), 0) AS total_chunks FROM collections c ORDER BY c.updated_at DESC, c.collection_id ASC `).all() as Array<{ collection_id: string; label: string | null; - src/server/mcp-server.ts:260-269 (registration)The registration definition of the "listCollections" tool in the MCP server tool list.
name: "listCollections", description: "List local transcript collections, active search focus, and indexed video/chunk counts.", inputSchema: { type: "object", properties: { includeVideoList: { type: "boolean" }, }, additionalProperties: false, }, },