Skip to main content
Glama
IBM
by IBM

remotion_generate_video

Generate complete video compositions by creating all TSX components and project files. After generation, run npm install and npm start to preview your professional video project.

Instructions

Generate the complete video composition and write all files.

Generates all TSX components, the composition file, and updates the project
with the complete video structure. After this, you can run 'npm install'
and 'npm start' in the project directory to preview the video.

Returns:
    JSON with generation results and next steps

Example:
    result = await remotion_generate_video()
    # Video files generated! Run 'npm install' and 'npm start' to preview

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault

No arguments

Implementation Reference

  • The remotion_generate_video tool handler: generates TSX components and composition file from the project timeline using the CompositionBuilder and ProjectManager. Registered via @mcp.tool decorator.
    @mcp.tool  # type: ignore[arg-type]
    async def remotion_generate_video() -> str:
        """
        Generate the complete video composition and write all files.
    
        Generates all TSX components, the composition file, and updates the project
        with the complete video structure. After this, you can run 'npm install'
        and 'npm start' in the project directory to preview the video.
    
        Returns:
            JSON with generation results and next steps
    
        Example:
            result = await remotion_generate_video()
            # Video files generated! Run 'npm install' and 'npm start' to preview
        """
    
        def _generate():
            if not project_manager.current_project:
                return json.dumps({"error": "No active project. Create a project first."})
    
            if not project_manager.current_timeline:
                return json.dumps({"error": "No timeline created. Add components first."})
    
            try:
                # Generate components
                theme = project_manager.current_timeline.theme
    
                # Helper to recursively find all component types including nested ones
                def find_all_component_types(components):
                    types = set()
                    from chuk_motion.generator.composition_builder import ComponentInstance
    
                    def collect_types(comp):
                        if isinstance(comp, ComponentInstance):
                            types.add(comp.component_type)
                            # Check for nested children in props
                            for _key, value in comp.props.items():
                                if isinstance(value, ComponentInstance):
                                    collect_types(value)
                                elif isinstance(value, list):
                                    for item in value:
                                        if isinstance(item, ComponentInstance):
                                            collect_types(item)
    
                    for comp in components:
                        collect_types(comp)
    
                    return types
    
                # Get unique component types from all tracks (including nested)
                all_components = project_manager.current_timeline.get_all_components()
                component_types = find_all_component_types(all_components)
    
                generated_files = []
    
                for comp_type in component_types:
                    # Get a sample config from the timeline
                    # For nested components, use empty config as templates handle it
                    file_path = project_manager.add_component_to_project(comp_type, {}, theme)
                    generated_files.append(file_path)
    
                # Generate main composition
                composition_file = project_manager.generate_composition()
                generated_files.append(composition_file)
    
                project_info = project_manager.get_project_info()
    
                return json.dumps(
                    {
                        "status": "success",
                        "project": project_info,
                        "generated_files": generated_files,
                        "next_steps": [
                            f"cd {project_info['path']}",
                            "npm install",
                            "npm start  # Opens Remotion Studio",
                            "npm run build  # Renders the video",
                        ],
                    },
                    indent=2,
                )
    
            except Exception as e:
                return json.dumps({"error": str(e)})
    
        return await asyncio.get_event_loop().run_in_executor(None, _generate)
Behavior3/5

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

With no annotations provided, the description carries the full burden of behavioral disclosure. It describes the tool's actions (generates files, updates project) and post-execution steps (npm install/start), which is helpful. However, it lacks details on potential side effects (e.g., overwriting existing files), error conditions, permissions needed, or performance characteristics (e.g., time/complexity). The description doesn't contradict annotations (none exist).

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 well-structured and appropriately sized. It front-loads the core purpose, explains the generation process, provides actionable next steps, and includes a concise example. Each sentence adds value without redundancy. Minor room for improvement in tightening phrasing (e.g., 'complete video composition' could be slightly redundant).

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

Completeness3/5

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

Given the tool's complexity (generating multiple files and updating project structure), no annotations, and no output schema, the description is moderately complete. It covers the what and how-to-next, but lacks details on output format (beyond 'JSON with generation results'), error handling, dependencies, or integration with sibling tools. For a zero-param tool with significant behavioral impact, more context would be beneficial.

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

Parameters4/5

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

The tool has 0 parameters with 100% schema description coverage (empty schema). The description doesn't need to explain parameters, so it appropriately focuses on behavior and outcomes. No parameter information is missing or needed, justifying a baseline score of 4 for this context.

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

Purpose4/5

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

The description clearly states the tool's purpose: 'Generate the complete video composition and write all files' and 'Generates all TSX components, the composition file, and updates the project with the complete video structure.' This specifies the verb (generate/write) and resource (video composition/files/TSX components/composition file/project structure). However, it doesn't explicitly differentiate from siblings like 'remotion_create_project' or 'remotion_add_title_scene' beyond the scope of generating a 'complete' video.

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 provides clear context for when to use this tool: after project creation and before previewing ('After this, you can run 'npm install' and 'npm start'...'). It implies this is a final step in video generation, but doesn't explicitly state when NOT to use it (e.g., vs. incremental tools like 'remotion_add_title_scene') or name alternatives among siblings.

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/IBM/chuk-motion'

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