mcpengine/servers/loom/src/tools/transcript-tools.ts
Jake Shore d25ea2031b Gold standard upgrade: greenhouse, lever, loom
- Greenhouse: 29 tools (was 18), added interviews, scorecards, organization
- Lever: 26 tools (was 13), added tags, sources, expanded opportunities/postings
- Loom: 25 tools (was 14), added analytics, privacy, search, workspace members

All servers now have:
- main.ts with env validation & graceful shutdown
- server.ts with lazy-loaded tool modules
- Zod validation on all inputs
- Rich tool descriptions (when/why to use)
- Pagination support on all list_* tools
- Updated package.json (bin field, updated deps)
- Updated README with coverage manifests
- Old index.ts renamed to index.ts.bak
- Zero TypeScript errors (npx tsc --noEmit verified)
2026-02-14 05:52:42 -05:00

74 lines
2.7 KiB
TypeScript

import { z } from 'zod';
import { LoomClient } from '../client/loom-client.js';
const GetTranscriptInput = z.object({
video_id: z.string().describe('Video ID'),
format: z.enum(['json', 'text', 'srt', 'vtt']).default('json').describe('Transcript format'),
});
const DownloadVideoTranscriptInput = z.object({
video_id: z.string().describe('Video ID'),
format: z.enum(['srt', 'vtt', 'txt']).default('srt').describe('Download format'),
});
export default [
{
name: 'loom_get_transcript',
description: 'Retrieves the transcript of a Loom video. Use when you need to access video content as text, search for specific phrases, create searchable documentation, or analyze video content programmatically. Returns transcript in specified format (json with timestamps, plain text, SRT subtitles, or WebVTT). Note: video must have transcription enabled.',
inputSchema: {
type: 'object' as const,
properties: {
video_id: {
type: 'string',
description: 'Video ID',
},
format: {
type: 'string',
enum: ['json', 'text', 'srt', 'vtt'],
default: 'json',
description: 'Transcript format (json=timestamped, text=plain, srt/vtt=subtitle files)',
},
},
required: ['video_id'],
},
handler: async (input: unknown, client: LoomClient) => {
const validated = GetTranscriptInput.parse(input);
const result = await client.get(`/videos/${validated.video_id}/transcript`, {
format: validated.format,
});
return {
content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
};
},
},
{
name: 'loom_download_video_transcript',
description: 'Downloads a Loom video transcript in subtitle format (SRT, VTT, or TXT). Use when you need to download subtitle files for video editing, create caption files for accessibility, or export transcripts for external use. Returns downloadable transcript file in specified format.',
inputSchema: {
type: 'object' as const,
properties: {
video_id: {
type: 'string',
description: 'Video ID',
},
format: {
type: 'string',
enum: ['srt', 'vtt', 'txt'],
default: 'srt',
description: 'Download format (srt=SubRip, vtt=WebVTT, txt=plain text)',
},
},
required: ['video_id'],
},
handler: async (input: unknown, client: LoomClient) => {
const validated = DownloadVideoTranscriptInput.parse(input);
const result = await client.get(`/videos/${validated.video_id}/transcript/download`, {
format: validated.format,
});
return {
content: [{ type: 'text' as const, text: JSON.stringify(result, null, 2) }],
};
},
},
];