create_short
Generate AI-powered short-form video clips from YouTube videos or uploaded files by specifying start/end times and customizing duration, captions, overlays, and background music.
Instructions
Create AI-generated short-form video clips from a YouTube video or uploaded file. Returns a request ID instantly. Processing takes 5-30 minutes. Costs 1 credit.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| url | No | YouTube video URL | |
| fileUrl | No | Public video file URL (alternative to url) | |
| start | Yes | Start time in seconds (>= 0) | |
| end | Yes | End time in seconds (> start, max 1200s window) | |
| preferredLength | No | Target clip duration | under60sec |
| language | No | Spoken language (ISO 639-1) | en |
| captionLanguage | No | Caption language if different from spoken | |
| templateId | No | Caption template ID from list_templates (24-char hex) | |
| noClipping | No | Skip AI clipping, process entire range as one clip | |
| hookTitle | No | Add animated hook title at start | |
| memeHook | No | Prepend a meme hook clip (2-5s attention grabber) | |
| memeHookName | No | Exact meme hook name from list_meme_hooks (case-sensitive) | |
| gameVideo | No | Add split-screen gameplay overlay | |
| gameVideoName | No | Exact game video name from list_game_videos (case-sensitive) | |
| ctaEnabled | No | Show call-to-action text overlay | |
| ctaText | No | CTA text (max 200 chars, required when ctaEnabled=true) | |
| music | No | Add background music | |
| musicName | No | Exact track name from list_music (case-sensitive) | |
| musicVolume | No | Music volume 0-100 | |
| layout | No | Video framing layout | auto |
Implementation Reference
- src/tools/create-short.js:38-61 (handler)Handler function for create_short, which validates parameters and calls the client service.
async (params) => { if (!params.url && !params.fileUrl) { return { content: [{ type: 'text', text: formatError({ message: 'Either url or fileUrl is required', code: 'invalid_request' }) }], isError: true }; } if (params.url && params.fileUrl) { return { content: [{ type: 'text', text: formatError({ message: 'Provide either url or fileUrl, not both', code: 'invalid_request' }) }], isError: true }; } if (params.start >= params.end) { return { content: [{ type: 'text', text: formatError({ message: 'Start time must be less than end time', code: 'invalid_request' }) }], isError: true }; } if ((params.end - params.start) > 1200) { return { content: [{ type: 'text', text: formatError({ message: 'Time window exceeds maximum of 1200 seconds (20 minutes)', code: 'invalid_request' }) }], isError: true }; } if (params.ctaEnabled && !params.ctaText) { return { content: [{ type: 'text', text: formatError({ message: 'ctaText is required when ctaEnabled is true', code: 'invalid_request' }) }], isError: true }; } try { const result = await client.createShort(params); return { content: [{ type: 'text', text: formatCreateShortResponse(result) }] }; } catch (error) { return { content: [{ type: 'text', text: formatError(error) }], isError: true }; } } - src/tools/create-short.js:9-31 (schema)Zod schema definition for create_short input parameters.
const schema = { url: z.string().describe('YouTube video URL').optional(), fileUrl: z.string().url().describe('Public video file URL (alternative to url)').optional(), start: z.number().min(0).describe('Start time in seconds (>= 0)'), end: z.number().min(1).describe('End time in seconds (> start, max 1200s window)'), preferredLength: z.enum(['under30sec', 'under60sec', 'under90sec', 'under3min', 'under5min', 'under10min']) .default('under60sec').describe('Target clip duration').optional(), language: z.enum(SUPPORTED_LANGUAGES).default('en').describe('Spoken language (ISO 639-1)').optional(), captionLanguage: z.enum(SUPPORTED_LANGUAGES).describe('Caption language if different from spoken').optional(), templateId: z.string().regex(/^[0-9a-fA-F]{24}$/).describe('Caption template ID from list_templates (24-char hex)').optional(), noClipping: z.boolean().default(false).describe('Skip AI clipping, process entire range as one clip').optional(), hookTitle: z.boolean().default(false).describe('Add animated hook title at start').optional(), memeHook: z.boolean().default(false).describe('Prepend a meme hook clip (2-5s attention grabber)').optional(), memeHookName: z.string().describe('Exact meme hook name from list_meme_hooks (case-sensitive)').optional(), gameVideo: z.boolean().default(false).describe('Add split-screen gameplay overlay').optional(), gameVideoName: z.string().describe('Exact game video name from list_game_videos (case-sensitive)').optional(), ctaEnabled: z.boolean().default(false).describe('Show call-to-action text overlay').optional(), ctaText: z.string().max(200).describe('CTA text (max 200 chars, required when ctaEnabled=true)').optional(), music: z.boolean().default(false).describe('Add background music').optional(), musicName: z.string().describe('Exact track name from list_music (case-sensitive)').optional(), musicVolume: z.number().min(0).max(100).default(10).describe('Music volume 0-100').optional(), layout: z.enum(['auto', 'fill', 'fit', 'square']).default('auto').describe('Video framing layout').optional(), }; - src/tools/create-short.js:33-37 (registration)Registration function for the create_short tool.
export function registerCreateShort(server, client) { server.tool( 'create_short', 'Create AI-generated short-form video clips from a YouTube video or uploaded file. Returns a request ID instantly. Processing takes 5-30 minutes. Costs 1 credit.', schema,