Skip to main content
Glama

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
NameRequiredDescriptionDefault
includeVideoListNo

Implementation Reference

  • 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"),
      });
  • 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;
  • 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,
      },
    },

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