Skip to main content
Glama

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

TableJSON Schema
NameRequiredDescriptionDefault
urlNoYouTube video URL
fileUrlNoPublic video file URL (alternative to url)
startYesStart time in seconds (>= 0)
endYesEnd time in seconds (> start, max 1200s window)
preferredLengthNoTarget clip durationunder60sec
languageNoSpoken language (ISO 639-1)en
captionLanguageNoCaption language if different from spoken
templateIdNoCaption template ID from list_templates (24-char hex)
noClippingNoSkip AI clipping, process entire range as one clip
hookTitleNoAdd animated hook title at start
memeHookNoPrepend a meme hook clip (2-5s attention grabber)
memeHookNameNoExact meme hook name from list_meme_hooks (case-sensitive)
gameVideoNoAdd split-screen gameplay overlay
gameVideoNameNoExact game video name from list_game_videos (case-sensitive)
ctaEnabledNoShow call-to-action text overlay
ctaTextNoCTA text (max 200 chars, required when ctaEnabled=true)
musicNoAdd background music
musicNameNoExact track name from list_music (case-sensitive)
musicVolumeNoMusic volume 0-100
layoutNoVideo framing layoutauto

Implementation Reference

  • 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 };
      }
    }
  • 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(),
    };
  • 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,
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

No annotations provided, but description discloses critical behavioral traits: async processing (returns ID instantly, 5-30min processing time) and cost model (1 credit). Could mention idempotency or failure modes.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness5/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Four sentences with zero waste: purpose, return value, processing time, and cost. Front-loaded with the core action. Every sentence earns its place.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

For a complex 20-parameter tool with 100% schema coverage, the description appropriately focuses on async return pattern and cost rather than repeating parameter docs. Lacks mention of status polling requirement (get_status) preventing a 5.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema has 100% description coverage, establishing baseline 3. Description mentions 'YouTube video or uploaded file' which loosely maps to url/fileUrl parameters, but adds minimal semantic value beyond what the schema already provides.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

Specific verb 'Create' + resource 'AI-generated short-form video clips' + source types 'YouTube video or uploaded file'. Clearly distinguishes from sibling list/get/delete tools.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines3/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Implies async workflow via 'Returns a request ID instantly' and processing time, but fails to mention prerequisite sibling tools (list_templates, list_meme_hooks, etc.) required for parameters like templateId and memeHookName.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Install Server

Other Tools

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/ssembleinc/ssemble-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server