Skip to main content
Glama

generate_video

Create videos from text descriptions, animate images, or edit existing videos using Grok Imagine's AI capabilities within the MCP server.

Instructions

Generate or edit videos with Grok Imagine.

Text-to-video by default. Provide an image to animate (image-to-video), or
a source video to edit. Only one mode per call. Generation polls
synchronously (xAI's default timeout is 10 minutes).

Args:
    prompt: Video description, or the edit instruction for video editing.
    model: Video model (default `grok-imagine-video`).
    image_path: Local image to use as the starting frame.
    image_url: Public image URL to use as the starting frame.
    video_path: Local video to edit (max 20 MB, .mp4, ≤ 8.7s).
    video_url: Public video URL to edit (.mp4, ≤ 8.7s).
    duration: Video length in seconds (1–15, ignored when editing).
    aspect_ratio: Aspect ratio like `"16:9"` or `"9:16"` (ignored when editing).
    resolution: `"480p"` or `"720p"` (ignored when editing).

Returns:
    Markdown block with the generated video URL and actual duration.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYes
modelNogrok-imagine-video
image_pathNo
image_urlNo
video_pathNo
video_urlNo
durationNo
aspect_ratioNo
resolutionNo
Behavior4/5

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

With no annotations provided, the description carries full burden and does well by disclosing key behavioral traits: the synchronous polling mechanism, xAI's 10-minute timeout, file constraints (max 20 MB, .mp4, ≤ 8.7s), and mode exclusivity. It doesn't mention authentication requirements or rate limits, but covers substantial operational behavior.

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 with clear sections (overview, args, returns) and front-loaded with the core functionality. While comprehensive, it maintains efficiency with no redundant sentences. The parameter explanations are dense but necessary given the schema's lack of descriptions.

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 video generation/editing tool with 9 parameters, 0% schema coverage, and no output schema, the description provides substantial context. It covers modes, constraints, return format, and parameter interactions. The main gap is lack of error handling or permission information, but given the comprehensive parameter documentation and behavioral details, it's quite complete.

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?

With 0% schema description coverage and 9 parameters, the description provides excellent parameter semantics beyond the bare schema. It explains the purpose of each parameter, clarifies which parameters are ignored in certain modes (duration, aspect_ratio, resolution ignored when editing), specifies constraints (duration 1-15, video ≤ 8.7s), and provides format examples (aspect ratio like '16:9').

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's purpose with specific verbs ('Generate or edit videos') and resource ('with Grok Imagine'), distinguishing it from sibling tools like generate_image or extend_video. It explicitly mentions the three modes (text-to-video, image-to-video, video editing) which provides comprehensive scope definition.

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

Usage Guidelines5/5

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

The description provides excellent usage guidance with explicit conditions: 'Only one mode per call' establishes clear exclusivity rules, and it distinguishes between generation modes (text-to-video by default, image-to-video with image input, video editing with video input). It also mentions the synchronous polling behavior with timeout information.

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/merterbak/Grok-MCP'

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