Skip to main content
Glama
ex-takashima

Grok Imagine Video MCP Server

by ex-takashima

generate_video

Create videos from text prompts, images, or reference images, with customizable duration, resolution, and aspect ratio. Delivers MP4 files with auto-generated audio.

Instructions

Generate a new video using xAI Grok Imagine Video API (grok-imagine-video). Supports text-to-video (T2V), image-to-video (I2V), and reference-to-video (R2V). Supports aspect ratios: 16:9, 4:3, 1:1, 9:16, 3:4, 3:2, 2:3. Video duration: 1-15 seconds (default 8). Resolution: 480p, 720p, or 1080p (1080p only with model grok-imagine-video-1.5). The output MP4 always contains an auto-generated audio track (sound effects, ambience, score) driven by the prompt; there is no audio parameter. For image-to-video, provide image_url, image_path, or image_file_id. For reference-to-video, provide reference_images.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
modelNoModel to use (default: grok-imagine-video)
promptNoText prompt describing the video. Required for text-to-video and reference-to-video; optional for image-to-video (image alone drives generation).
durationNoVideo duration in seconds (1-15, default: 8)
image_urlNoSource image URL for image-to-video generation (optional)
image_pathNoLocal image file path for image-to-video generation. Sent as a base64 data URL; files over 10 MB are uploaded via the xAI Files API automatically (max 48 MB). Cannot be used together with image_url or image_file_id.
resolutionNoResolution of the generated video (default: 720p). 1080p is only available with model grok-imagine-video-1.5 (text-to-video and image-to-video).
output_pathNoOutput file path (default: generated_video.mp4)
aspect_ratioNoAspect ratio (default: 16:9)
image_file_idNoFile ID from the xAI Files API for image-to-video generation. Cannot be used together with image_url or image_path.
reference_imagesNoReference images for reference-to-video (R2V) generation, used as style/content references. Cannot be combined with image_url/image_path/image_file_id. Requires model grok-imagine-video; grok-imagine-video-1.5 rejects R2V.
Behavior5/5

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

With no annotations provided, the description carries the full burden and does so thoroughly. It discloses that the output MP4 always includes an auto-generated audio track with no audio parameter, explains resolution restrictions (1080p only with certain model), mentions automatic file upload for large image_path, and clarifies incompatibilities between input methods. This is substantial behavioral context beyond the schema.

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 a single dense paragraph but every sentence contributes necessary details (modes, aspect ratios, duration, resolution, audio behavior, input requirements). It is front-loaded with the primary purpose. While it could be broken into bullets, the length is justified given the tool's complexity, and there is no fluff.

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 10 parameters and no output schema, the description covers most behavioral aspects: modes, constraints, and input options. The main gap is that it does not explicitly state the return value or side effects (e.g., returns the output file path, uploads to Files API). Despite this, it provides enough context for an agent to invoke the tool correctly.

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?

Schema coverage is 100%, giving a baseline of 3. The description adds value by clarifying parameter interdependencies (e.g., prompt required for T2V/R2V, optional for I2V), model-specific restrictions (1080p, R2V availability), and the behavior of image_path (base64 upload path). This enriches the schema without being redundant.

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 opens with 'Generate a new video using xAI Grok Imagine Video API,' which clearly states the action (generate) and resource (new video), and distinguishes this from sibling tools like edit_video and extend_video since it creates a new video. It further lists supported modes (T2V, I2V, R2V), providing a precise scope.

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 explains when to use each mode (e.g., 'For image-to-video, provide image_url, image_path, or image_file_id') and states model-specific constraints, but it does not explicitly compare against sibling tools or provide 'when not to use' guidance. The context is clear and actionable, but lacks explicit exclusions or alternative tool references.

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/ex-takashima/grok-imagine-video-mcp-server'

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