Skip to main content
Glama

importVideos

Add videos to a transcript collection for semantic search by specifying video IDs or URLs, collection settings, and chunking options.

Instructions

Import one or more videos into a local transcript collection for later semantic search.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
videoIdsOrUrlsYes
collectionIdNo
chunkStrategyNo
chunkSizeSecNo
chunkOverlapSecNo
languageNo
reindexExistingNo
labelNo
embeddingProviderNo
embeddingModelNo
embeddingDimensionsNo
activateCollectionNo
dryRunNo

Implementation Reference

  • Implementation of the importVideos tool, which calls ensureCollection and persistItems to import videos into the transcript knowledge base.
    importVideos(seed: CollectionSeed, items: ImportTranscriptItem[]): ImportVideosOutput {
      this.ensureCollection(seed);
      const stats = this.persistItems(seed.collectionId, items);
      return {
        import: stats.import,
        failures: stats.failures.length > 0 ? stats.failures : undefined,
        collectionId: seed.collectionId,
        provenance: localProvenance(),
      };
    }
  • Tool registration for importVideos in mcp-server.ts.
      name: "importVideos",
      description: "Import one or more videos into a local transcript collection for later semantic search.",
      inputSchema: {
        type: "object",
        properties: {
          videoIdsOrUrls: { type: "array", items: { type: "string" }, minItems: 1, maxItems: 50 },
          collectionId: { type: "string" },
          chunkStrategy: { type: "string", enum: ["time_window", "chapters", "auto"] },
          chunkSizeSec: { type: "number", minimum: 30, maximum: 900 },
          chunkOverlapSec: { type: "number", minimum: 0, maximum: 300 },
          language: { type: "string" },
          reindexExisting: { type: "boolean" },
          label: { type: "string" },
          embeddingProvider: { type: "string", enum: ["local", "gemini"] },
          embeddingModel: { type: "string" },
          embeddingDimensions: { type: "number", minimum: 128, maximum: 3072 },
          activateCollection: { type: "boolean" },
          dryRun: { type: "boolean" },
        },
        required: ["videoIdsOrUrls"],
        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