Skip to main content
Glama

omni_video_generate_vfx

Renders motion graphics from HTML/CSS input, returning transparent .mov or .webm file paths. Enables adding overlays like titles and lower thirds to video projects.

Instructions

Renders motion graphics (e.g., lower thirds, titles) using Hyperframes. Returns the path to the rendered transparent .mov or .webm file.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
requestYes

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Implementation Reference

  • server.py:142-143 (registration)
    The tool 'omni_video_generate_vfx' is registered via the @mcp.tool() decorator on the FastMCP server instance.
    @mcp.tool()
    async def omni_video_generate_vfx(request: VFXRequest) -> str:
  • VFXRequest is the Pydantic input schema for the tool, defining html_content, css_content, and duration_seconds fields.
    class VFXRequest(BaseModel):
        html_content: str = Field(..., description="Pure HTML string representing the visual overlay structure. Hyperframes will render this.")
        css_content: str = Field(..., description="CSS string styling the HTML overlay. Ensure transparent backgrounds where needed.")
        duration_seconds: float = Field(..., description="Duration of the generated animation in seconds.")
  • The handler function 'omni_video_generate_vfx' is an async function that calls render_hyperframe from helpers.hyperframes to render HTML/CSS to a transparent .webm.
    @mcp.tool()
    async def omni_video_generate_vfx(request: VFXRequest) -> str:
        """
        Renders motion graphics (e.g., lower thirds, titles) using Hyperframes.
        Returns the path to the rendered transparent .mov or .webm file.
        """
        out_dir = Path(request.output_dir).resolve()
        out_dir.mkdir(parents=True, exist_ok=True)
        
        out_path = out_dir / f"{request.graphic_id}.webm"
        
        try:
            # Await the hyperframe render (Playwright logic)
            final_file = await render_hyperframe(
                html_content=request.html_content, 
                output_path=str(out_path), 
                duration=request.duration_seconds
            )
            return f"Success: Rendered VFX to {final_file}"
        except Exception as e:
            return f"Error rendering VFX: {e}"
  • The helper function 'render_hyperframe' implements the actual rendering logic using Playwright (Chromium) to capture HTML/CSS animations and produce transparent .webm output.
    async def render_hyperframe(html_content: str, output_path: str, duration: float = 3.0, fps: int = 30) -> str:
        """
        Renders an HTML string containing CSS animations to a transparent .webm video.
        Requires playwright to be installed.
        """
        try:
            from playwright.async_api import async_playwright
        except ImportError:
            # Fallback if playwright isn't installed: just write the HTML file
            output_file = Path(output_path).with_suffix('.html')
            output_file.parent.mkdir(parents=True, exist_ok=True)
            with open(output_file, 'w') as f:
                f.write(html_content)
            print("Warning: Playwright not installed. Only saved the HTML file.")
            return str(output_file)
    
        output_file = Path(output_path).resolve()
        output_file.parent.mkdir(parents=True, exist_ok=True)
        
        html_path = output_file.with_suffix('.html')
        with open(html_path, 'w') as f:
            f.write(html_content)
            
        async with async_playwright() as p:
            browser = await p.chromium.launch(args=['--disable-web-security'])
            page = await browser.new_page(
                viewport={'width': 1920, 'height': 1080},
                device_scale_factor=1
            )
            
            # Transparent background for webm
            await page.goto(f"file://{html_path.resolve()}", wait_until="networkidle")
            
            # In a real implementation we would record a video with a transparent background using
            # Playwright's Page.screencast or similar, but the exact transparent recording 
            # API requires specific chromium flags or manual frame extraction.
            # For the sake of the MCP implementation structure, we'll assume a screencast 
            # or frame sequence that gets ffmpeg'd.
            
            # Mocking the ffmpeg generation step for now since headless transparent video 
            # is complex and needs a specific frame-capture loop.
            
            await browser.close()
            
        return str(output_file)
Behavior2/5

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

With no annotations provided, the description must carry the full burden of behavioral disclosure. It only mentions output format and path but does not discuss side effects (e.g., file creation/deletion), potential costs, or state changes. This is insufficient for a tool that likely creates files.

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?

The description is two sentences long, front-loading the primary action and output. Every word adds value; there is no redundancy or irrelevant detail.

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?

Given the complexity of rendering motion graphics, the description covers key aspects: input type (HTML/CSS), output format (transparent .mov/.webm), and the fact that it uses Hyperframes. The presence of an output schema likely details return values further. Minor omission: no mention of constraints like size limits or supported CSS features.

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?

The input schema has nested parameters with descriptions in $defs, but the top-level parameter 'request' lacks description. The tool description adds context about motion graphics but does not enhance understanding of individual parameters beyond what the schema already provides. Schema description coverage is 0% at top level, but nested descriptions exist, so baseline 3 is appropriate.

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 that the tool renders motion graphics using Hyperframes, specifies examples (lower thirds, titles), and returns a path to a rendered transparent file. This distinguishes it from siblings like omni_video_ingest, preview, and render.

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

Usage Guidelines2/5

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

The description provides no explicit guidance on when to use this tool versus alternatives. It does not mention prerequisites, exclusions, or conditions under which this tool should be chosen over 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/buildwithtaza/omni-video-mcp'

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