Tools & Keyframes Reference

Complete reference for all MCP tools exposed by DevMotion and the keyframe animation system.


Available Tools

ToolDescription
create_projectCreate a new animation project
get_projectInspect project state, layers, and keyframes
create_layerAdd a layer with optional animations and keyframes
edit_layerPatch an existing layer’s properties or keyframes
remove_layerDelete a layer from the project
configure_projectUpdate project dimensions, duration, FPS, background
group_layersGroup multiple layers together
ungroup_layersUngroup a layer group
action_generate_captionsTranscribe audio/video to word-level captions
action_dub_audioDub audio into another language with AI voice cloning
action_extract_audioExtract audio track from a video layer

create_project

create_project
{
  "name": "TikTok Intro",
  "width": 1080,
  "height": 1920
}

Returns the project id and a preview URL. Use the id in every subsequent call.


create_layer

Creates a complete layer in a single call. The layer field is required and carries the type + props.

create_layer — text layer with slide-in animation
{
  "projectId": "your_project_id",
  "name": "Title",
  "layer": {
    "type": "text",
    "props": {
      "content": "Hello World",
      "fontSize": 64,
      "color": "#ffffff"
    }
  },
  "transform": {
    "position": { "x": 0, "y": -200 }
  },
  "animation": {
    "keyframes": [
      { "id": "kf1", "time": 0,   "property": "position.x", "value": -400, "easing": "ease-out" },
      { "id": "kf2", "time": 0.5, "property": "position.x", "value": 0 }
    ]
  }
}
create_layer — shape with preset animation
{
  "projectId": "your_project_id",
  "name": "Accent Shape",
  "layer": {
    "type": "shape",
    "props": {
      "shapeType": "rectangle",
      "background": { "type": "solid", "color": "#ff4455" }
    }
  },
  "transform": {
    "position": { "x": 0, "y": 300 },
    "scale": { "x": 0.8, "y": 0.1 }
  },
  "animation": {
    "preset": { "id": "fade-in", "startTime": 0.2, "duration": 0.4 }
  }
}

create_layer fields

FieldTypeRequiredDescription
projectIdstringProject to add the layer to
layerobject{ type, props } — see Layer Types below
namestringDisplay name
transformobjectPosition, scale, rotation, anchor
styleobjectOpacity, blur, filters, drop shadow
enterTimenumberWhen the layer appears (seconds, default 0)
exitTimenumberWhen the layer disappears (seconds)
animationobject{ preset?, keyframes? } — can use both at once

edit_layer

Patch-style update — only the fields you provide are changed.

edit_layer — update position and color
{
  "projectId": "your_project_id",
  "layerId": "layer_abc",
  "transform": {
    "position": { "x": 100, "y": -200 }
  },
  "props": {
    "color": "#ffcc00"
  }
}

props are merged with existing props. transform and style replace the entire section if provided.


remove_layer

remove_layer
{
  "projectId": "your_project_id",
  "layerId": "layer_abc"
}

layerId accepts either the layer’s ID or its display name.


configure_project

configure_project — resize to landscape
{
  "projectId": "your_project_id",
  "width": 1920,
  "height": 1080,
  "duration": 10,
  "backgroundColor": "#1a1a2e"
}

All fields are optional. backgroundColor is a hex string.


group_layers / ungroup_layers

group_layers
{
  "projectId": "your_project_id",
  "layerIds": ["layer_abc", "layer_def"],
  "name": "Background Group"
}
ungroup_layers
{
  "projectId": "your_project_id",
  "groupId": "group_xyz"
}

Media Actions

These tools run AI-powered operations on media layers (video/audio). Each action creates new layers and/or modifies the source layer automatically.

action_generate_captions

Transcribe a video or audio layer into word-level captions using Whisper AI.

action_generate_captions
{
  "projectId": "your_project_id",
  "layerId": "video_layer_id",
  "language": "en",
  "prompt": "Optional context for transcription accuracy"
}
FieldTypeRequiredDescription
projectIdstringProject containing the layer
layerIdstringVideo or audio layer to transcribe
languagestringLanguage code (e.g. “en”, “es”). Omit for auto-detect
promptstringContext to guide transcription (lyrics, terminology)

Creates a new captions layer linked to the source media.

action_dub_audio

Dub audio into another language using AI voice cloning (ElevenLabs).

action_dub_audio
{
  "projectId": "your_project_id",
  "layerId": "audio_layer_id",
  "targetLang": "es"
}
FieldTypeRequiredDescription
projectIdstringProject containing the layer
layerIdstringAudio or video layer to dub
targetLangstringTarget language code: en, es, fr, de, it, pt, ru, ja, ko, zh, ar, hi, nl, pl, tr
sourceLangstringSource language code. Omit for auto-detect

Creates a new audio layer with the dubbed track and mutes the original.

action_extract_audio

Extract the audio track from a video layer using FFmpeg.

action_extract_audio
{
  "projectId": "your_project_id",
  "layerId": "video_layer_id"
}
FieldTypeRequiredDescription
projectIdstringProject containing the layer
layerIdstringVideo layer to extract audio from

Creates a new audio layer and mutes the original video. Free — no AI credits required.


Layer Types

TypeKey props
textcontent (string), fontSize, color, fontFamily, fontWeight
shapeshapeType (rectangle/ellipse/circle/…), background
imagesrc (URL)
videosrc (URL)
group(no props — use group_layers instead)

Keyframe Animation

Layers are animated by adding keyframes at specific times. DevMotion interpolates between them automatically using the easing curve you specify.

Pass keyframes inside animation.keyframes when calling create_layer, or add them later with edit_layer.

Animatable Properties

PropertyDescription
position.x / position.yPosition in pixels
position.zZ depth
scale.x / scale.yScale (1 = 100%)
rotation.x / rotation.y / rotation.zRotation in degrees
opacityTransparency (0–1)
props.fontSizeFont size (text layers)
props.colorText color (hex)
props.contentText content (typewriter)

Keyframe schema

Each keyframe requires an id (any unique string — DevMotion replaces it internally):

{ "id": "kf1", "time": 0.5, "property": "position.y", "value": -200, "easing": "ease-out" }

Easing Values

ValueDescription
linearConstant speed
ease-inStarts slow, ends fast
ease-outStarts fast, ends slow
ease-in-outSlow at both ends
bounceElastic bounce at end

Example Prompts

  • “Create a 9:16 product showcase with a phone mockup image, a title, and a price tag that bounces in.”
  • “Make a lower-third bar with white text on a semi-transparent dark background that slides in from the left.”
  • “Build a 5-second countdown animation with a large number that scales up and fades out each second.”
  • “Edit the ‘Headline’ layer to use yellow and add a shake animation.”