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
| Name | Required | Description | Default |
|---|---|---|---|
| videoIdsOrUrls | Yes | ||
| collectionId | No | ||
| chunkStrategy | No | ||
| chunkSizeSec | No | ||
| chunkOverlapSec | No | ||
| language | No | ||
| reindexExisting | No | ||
| label | No | ||
| embeddingProvider | No | ||
| embeddingModel | No | ||
| embeddingDimensions | No | ||
| activateCollection | No | ||
| dryRun | No |
Implementation Reference
- src/lib/knowledge-base.ts:261-270 (handler)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(), }; } - src/server/mcp-server.ts:219-241 (registration)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, }, },