Skip to main content
Glama

create_video_config

Generate a JSON configuration for video generation with support for clips, layers, transitions, and audio options, ready for validation or API submission.

Instructions

Create a JSON configuration for video generation based on jsoncut documentation.

Returns a complete configuration object that can be used with the validate_config tool or submitted directly to the jsoncut API.

WORKFLOW:

  1. First get the schema (read resource schema://video or call get_video_schema) to understand all available options

  2. Create the configuration with this tool

  3. Call validate_config to verify the configuration (if user provided media file paths)

Video Structure:

  • Built using clips (segments) that play sequentially

  • Each clip contains layers (rendered bottom to top)

  • Supports transitions between clips

  • Comprehensive audio system with multiple options

Layer Types:

  • video: Display video files with timing control, Ken Burns effects, and enhanced positioning

  • image: Static images with positioning and Ken Burns effects

  • image-overlay: Images positioned over other content with timing

  • title: Large headline text with animation styles (fade-in, word-by-word, letter-by-letter) and enhanced positioning

  • subtitle: Smaller text for captions

  • news-title: Breaking news style with colored backgrounds

  • title-background: Titles with full-screen backgrounds

  • slide-in-text: Animated text that slides in

  • audio: Audio tracks tied to clips (requires keepSourceAudio: true)

  • detached-audio: Audio with clip-relative timing

  • fill-color: Solid color backgrounds

  • linear-gradient: Linear gradient backgrounds

  • radial-gradient: Radial gradient backgrounds

  • rainbow-colors: Animated rainbow effects

  • pause: Black screen pauses

Audio Options:

  • audioFilePath + loopAudio: Background music throughout video

  • audioTracks: Multiple audio tracks with independent timing

  • audioNorm: Audio normalization with ducking

  • keepSourceAudio: Keep audio from video layers

  • Audio layers within clips

Video & title layer Positioning:

  • Position objects: { x: 0-1, y: 0-1, originX: left|center|right, originY: top|center|bottom }

  • Position strings: center, top, bottom, top-left, top-right, center-left, center-right, bottom-left, bottom-right

  • Video layers support both position objects and strings

  • Title layers support enhanced positioning with position objects

Title Layer Animation Styles:

  • fade-in: Smooth fade-in effect (default)

  • word-by-word: Words appear sequentially

  • letter-by-letter: Letters appear sequentially

  • Zoom effects automatically disabled for word-by-word and letter-by-letter styles

Transitions: 75+ transition effects including fade, wipe, circle, cube, glitch, zoom, etc.

File paths should be placeholders like "/input/userXXX/filename.ext".

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
widthNoWidth in pixels (default: 1280)
heightNoHeight in pixels (default: 720)
fpsNoFrames per second (24, 25, 30, 50, 60, 120)
formatNoOutput format: mp4 or movmp4
fastNoEnable fast processing mode (for preview)
audioFilePathNoPath to background audio file (plays throughout video)
loopAudioNoLoop background audio if shorter than video
outputVolumeNoFinal output volume (0-1)
keepSourceAudioNoKeep audio from video layers (required for audio layers)
clipsAudioVolumeNoVolume for audio from clips relative to tracks (0-1)
audioTracksNoMultiple audio tracks with independent timing
audioNormNoAudio normalization with ducking
defaultsNoDefault properties for clips and layers
clipsYesArray of clip objects. Each clip has layers and optional duration/transition.

Implementation Reference

  • The main handler for 'create_video_config'. Builds a video config object from arguments (width, height, fps, format, clips) and optional properties (fast, audioFilePath, loopAudio, outputVolume, keepSourceAudio, clipsAudioVolume, audioTracks, audioNorm, defaults). Returns the config wrapped in { type: 'video', config }.
    private async handleCreateVideoConfig(args: any) {
      const config: any = {
        width: args.width || 1280,
        height: args.height || 720,
        fps: args.fps || 25,
        format: args.format || 'mp4',
        clips: args.clips || [],
      };
    
      // Optional properties
      if (args.fast !== undefined) {
        config.fast = args.fast;
      }
    
      // Background audio
      if (args.audioFilePath) {
        config.audioFilePath = args.audioFilePath;
      }
      if (args.loopAudio !== undefined) {
        config.loopAudio = args.loopAudio;
      }
      if (args.outputVolume !== undefined) {
        config.outputVolume = args.outputVolume;
      }
      if (args.keepSourceAudio !== undefined) {
        config.keepSourceAudio = args.keepSourceAudio;
      }
      if (args.clipsAudioVolume !== undefined) {
        config.clipsAudioVolume = args.clipsAudioVolume;
      }
    
      // Audio tracks
      if (args.audioTracks && args.audioTracks.length > 0) {
        config.audioTracks = args.audioTracks;
      }
    
      // Audio normalization
      if (args.audioNorm) {
        config.audioNorm = args.audioNorm;
      }
    
      // Defaults
      if (args.defaults) {
        config.defaults = args.defaults;
      }
    
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(
              {
                type: 'video',
                config,
              },
              null,
              2
            ),
          },
        ],
      };
    }
  • Tool registration and input schema for 'create_video_config' in the stdio server (src/index.ts). Defines the full description, workflow instructions, layer types, and detailed inputSchema with all properties (width, height, fps, format, fast, audioFilePath, loopAudio, outputVolume, keepSourceAudio, clipsAudioVolume, audioTracks, audioNorm, defaults, clips).
              name: 'create_video_config',
              description: `Create a JSON configuration for video generation based on jsoncut documentation.
              
    Returns a complete configuration object that can be used with the validate_config tool or submitted directly to the jsoncut API.
    
    **WORKFLOW:** 
    1. First get the schema (read resource schema://video or call get_video_schema) to understand all available options
    2. Create the configuration with this tool
    3. Call validate_config to verify the configuration (if user provided media file paths)
    
    **Video Structure:**
    - Built using clips (segments) that play sequentially
    - Each clip contains layers (rendered bottom to top)
    - Supports transitions between clips
    - Comprehensive audio system with multiple options
    
    **Layer Types:**
    - video: Display video files with timing control, Ken Burns effects, and enhanced positioning
    - image: Static images with positioning and Ken Burns effects
    - image-overlay: Images positioned over other content with timing
    - title: Large headline text with animation styles (fade-in, word-by-word, letter-by-letter) and enhanced positioning
    - subtitle: Smaller text for captions
    - news-title: Breaking news style with colored backgrounds
    - title-background: Titles with full-screen backgrounds
    - slide-in-text: Animated text that slides in
    - audio: Audio tracks tied to clips (requires keepSourceAudio: true)
    - detached-audio: Audio with clip-relative timing
    - fill-color: Solid color backgrounds
    - linear-gradient: Linear gradient backgrounds
    - radial-gradient: Radial gradient backgrounds
    - rainbow-colors: Animated rainbow effects
    - pause: Black screen pauses
    
    **Audio Options:**
    - audioFilePath + loopAudio: Background music throughout video
    - audioTracks: Multiple audio tracks with independent timing
    - audioNorm: Audio normalization with ducking
    - keepSourceAudio: Keep audio from video layers
    - Audio layers within clips
    
    **Video & title layer Positioning:**
    - Position objects: { x: 0-1, y: 0-1, originX: left|center|right, originY: top|center|bottom }
    - Position strings: center, top, bottom, top-left, top-right, center-left, center-right, bottom-left, bottom-right
    - Video layers support both position objects and strings
    - Title layers support enhanced positioning with position objects
    
    **Title Layer Animation Styles:**
    - fade-in: Smooth fade-in effect (default)
    - word-by-word: Words appear sequentially
    - letter-by-letter: Letters appear sequentially
    - Zoom effects automatically disabled for word-by-word and letter-by-letter styles
    
    **Transitions:** 75+ transition effects including fade, wipe, circle, cube, glitch, zoom, etc.
    
    File paths should be placeholders like "/input/userXXX/filename.ext".`,
              inputSchema: {
                type: 'object',
                properties: {
                  width: {
                    type: 'number',
                    description: 'Width in pixels (default: 1280)',
                    default: 1280,
                  },
                  height: {
                    type: 'number',
                    description: 'Height in pixels (default: 720)',
                    default: 720,
                  },
                  fps: {
                    type: 'number',
                    description: 'Frames per second (24, 25, 30, 50, 60, 120)',
                    default: 25,
                    enum: [24, 25, 30, 50, 60, 120]
                  },
                  format: {
                    type: 'string',
                    description: 'Output format: mp4 or mov',
                    enum: ['mp4', 'mov'],
                    default: 'mp4',
                  },
                  fast: {
                    type: 'boolean',
                    description: 'Enable fast processing mode (for preview)',
                    default: false
                  },
                  audioFilePath: {
                    type: 'string',
                    description: 'Path to background audio file (plays throughout video)',
                  },
                  loopAudio: {
                    type: 'boolean',
                    description: 'Loop background audio if shorter than video',
                    default: false
                  },
                  outputVolume: {
                    type: 'number',
                    description: 'Final output volume (0-1)',
                    default: 1
                  },
                  keepSourceAudio: {
                    type: 'boolean',
                    description: 'Keep audio from video layers (required for audio layers)',
                    default: false
                  },
                  clipsAudioVolume: {
                    type: 'number',
                    description: 'Volume for audio from clips relative to tracks (0-1)',
                    default: 1
                  },
                  audioTracks: {
                    type: 'array',
                    description: 'Multiple audio tracks with independent timing',
                    items: {
                      type: 'object',
                      properties: {
                        path: { type: 'string', description: 'Audio file path' },
                        mixVolume: { type: 'number', description: 'Relative volume (0-1)', default: 1 },
                        start: { type: 'number', description: 'Start time in video (seconds)', default: 0 },
                        cutFrom: { type: 'number', description: 'Cut from in audio file (seconds)', default: 0 },
                        cutTo: { type: 'number', description: 'Cut to in audio file (seconds)' }
                      }
                    },
                  },
                  audioNorm: {
                    type: 'object',
                    description: 'Audio normalization with ducking',
                    properties: {
                      enable: { type: 'boolean', default: false },
                      gaussSize: { type: 'number', description: 'Gaussian filter size (1-10)', default: 5 },
                      maxGain: { type: 'number', description: 'Max gain in dB', default: 30 }
                    }
                  },
                  defaults: {
                    type: 'object',
                    description: 'Default properties for clips and layers',
                    properties: {
                      duration: { type: 'number', description: 'Default clip duration' },
                      transition: { type: 'object', description: 'Default transition' },
                      layer: { type: 'object', description: 'Default layer properties' },
                      layerType: { type: 'object', description: 'Defaults per layer type' }
                    }
                  },
                  clips: {
                    type: 'array',
                    description: 'Array of clip objects. Each clip has layers and optional duration/transition.',
                    items: {
                      type: 'object',
                      properties: {
                        duration: { type: 'number', description: 'Clip duration in seconds' },
                        layers: { type: 'array', description: 'Array of layer objects' },
                        transition: { 
                          type: 'object', 
                          description: 'Transition to next clip',
                          properties: {
                            name: { type: 'string', description: 'Transition name (fade, wipe, etc.)' },
                            duration: { type: 'number', description: 'Transition duration in seconds' }
                          }
                        }
                      }
                    },
                  },
                },
                required: ['clips'],
              },
  • src/index.ts:506-507 (registration)
    Routing in the CallToolRequestSchema handler that dispatches 'create_video_config' to handleCreateVideoConfig.
    case 'create_video_config':
      return await this.handleCreateVideoConfig(args);
  • The handler for 'create_video_config' in the HTTP server variant. Simpler implementation that just returns args as JSON (echo/proxy mode).
    private handleCreateVideoConfig(args: any) {
      return {
        content: [
          {
            type: 'text',
            text: JSON.stringify(args, null, 2),
          },
        ],
      };
    }
  • Tool registration and input schema for 'create_video_config' in the HTTP server. Has simpler description and schema with fewer properties (width, height, fps, clips).
    name: 'create_video_config',
    description:
      'Create a JSON configuration for video generation. Returns a complete video config that can be sent to the Jsoncut API. Supports clips, multiple layer types, transitions, and audio.',
    inputSchema: {
      type: 'object',
      properties: {
        width: {
          type: 'number',
          description: 'Video width in pixels',
        },
        height: {
          type: 'number',
          description: 'Video height in pixels',
        },
        fps: {
          type: 'number',
          description: 'Frames per second',
        },
        clips: {
          type: 'array',
          description: 'Array of video clips',
        },
      },
      required: ['width', 'height', 'clips'],
    },
  • Routing in the CallToolRequestSchema handler dispatching 'create_video_config' to handleCreateVideoConfig in the HTTP server.
    case 'create_video_config':
      return this.handleCreateVideoConfig(args);
Behavior4/5

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

No annotations are provided, so the description carries full burden. It explains the tool creates a configuration object and describes the output in detail, including workflow and structure. It does not mention authorization, rate limits, or side effects, but for a non-destructive creation tool this is adequate.

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

Conciseness4/5

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

The description is long but well-structured with clear sections (WORKFLOW, Video Structure, Layer Types, etc.). It is front-loaded with purpose and workflow. While every sentence contributes value, it could be slightly more concise, but the structure compensates.

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

Completeness5/5

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

Given the tool's complexity (14 parameters, nested objects, many options), the description is comprehensive. It covers workflow, all layer types, audio options, positioning, transitions, and file path conventions. It also clarifies the return value and how to proceed with validation.

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

Parameters5/5

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

Schema description coverage is 100%, so baseline is 3. The description adds significant context beyond the schema, explaining video structure, layer types, audio options, positioning, and transitions. This greatly enhances understanding of how to use the parameters correctly.

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?

The description clearly states the tool creates a JSON configuration for video generation based on jsoncut documentation. It distinguishes from siblings like create_image_config and mentions the returned config can be used with validate_config or the API.

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

Usage Guidelines4/5

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

The description includes a WORKFLOW section that explicitly lists steps: first get schema, then create config, then validate config. It advises when to use validate_config (if user provided media file paths). However, it does not explicitly state when not to use this tool (e.g., for image configs), but sibling names imply the distinction.

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

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