Skip to main content
Glama
RamboRogers

FAL Image/Video MCP Server

by RamboRogers

vidu_text

Generate high-quality videos from text prompts using FAL AI models, with customizable duration and aspect ratio options.

Instructions

Vidu Q1 - High-quality text-to-video

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
promptYesText prompt for video generation
durationNo
aspect_ratioNo16:9

Implementation Reference

  • The handleTextToVideo method that implements the execution logic for the 'vidu_text' tool by calling the FAL API, processing the video output, handling downloads, data URLs, and auto-opening.
    private async handleTextToVideo(args: any, model: any) {
      const { prompt, duration = 5, aspect_ratio = '16:9' } = args;
    
      try {
        // Configure FAL client lazily with query config override
        configureFalClient(this.currentQueryConfig);
        const inputParams: any = { prompt };
        
        if (duration) inputParams.duration = duration;
        if (aspect_ratio) inputParams.aspect_ratio = aspect_ratio;
    
        const result = await fal.subscribe(model.endpoint, { input: inputParams });
        const videoData = result.data as FalVideoResult;
        const videoProcessed = await downloadAndProcessVideo(videoData.video.url, model.id);
    
        return {
          content: [
            {
              type: 'text',
              text: JSON.stringify({
                model: model.name,
                id: model.id,
                endpoint: model.endpoint,
                prompt,
                video: {
                  url: videoData.video.url,
                  localPath: videoProcessed.localPath,
                  ...(videoProcessed.dataUrl && { dataUrl: videoProcessed.dataUrl }),
                  width: videoData.video.width,
                  height: videoData.video.height,
                },
                metadata: inputParams,
                download_path: DOWNLOAD_PATH,
                data_url_settings: {
                  enabled: ENABLE_DATA_URLS,
                  max_size_mb: Math.round(MAX_DATA_URL_SIZE / 1024 / 1024),
                },
                autoopen_settings: {
                  enabled: AUTOOPEN,
                  note: AUTOOPEN ? "Files automatically opened with default application" : "Auto-open disabled"
                },
              }, null, 2),
            },
          ],
        };
      } catch (error) {
        throw new Error(`${model.name} generation failed: ${error}`);
      }
    }
  • src/index.ts:117-117 (registration)
    Registry entry in MODEL_REGISTRY.textToVideo that defines the 'vidu_text' tool ID, endpoint, name, and description used for dynamic tool registration.
    { id: 'vidu_text', endpoint: 'fal-ai/vidu/q1/text-to-video', name: 'Vidu Q1', description: 'High-quality text-to-video' }
  • Dynamic input schema generation for text-to-video tools like 'vidu_text' in generateToolSchema, defining prompt, duration, and aspect_ratio parameters.
    } else if (category === 'textToVideo') {
      baseSchema.inputSchema.properties = {
        prompt: { type: 'string', description: 'Text prompt for video generation' },
        duration: { type: 'number', default: 5, minimum: 1, maximum: 30 },
        aspect_ratio: { type: 'string', enum: ['16:9', '9:16', '1:1', '4:3', '3:4'], default: '16:9' },
      };
      baseSchema.inputSchema.required = ['prompt'];
  • Helper function getModelById used to retrieve the model configuration for 'vidu_text' during tool dispatch.
    // Helper function to get model by ID
    function getModelById(id: string) {
      const allModels = getAllModels();
      return allModels.find(model => model.id === id);
    }
  • Dispatch logic in CallToolRequestSchema handler that routes 'vidu_text' calls to handleTextToVideo based on registry lookup.
      return await this.handleImageGeneration(args, model);
    } else if (MODEL_REGISTRY.textToVideo.find(m => m.id === name)) {
      return await this.handleTextToVideo(args, model);
    } else if (MODEL_REGISTRY.imageToVideo.find(m => m.id === name)) {
      return await this.handleImageToVideo(args, model);
Behavior2/5

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

With no annotations provided, the description carries full burden for behavioral disclosure. It mentions 'High-quality' but doesn't specify what that means in practice - no information about generation time, rate limits, authentication requirements, output format, or quality characteristics. The description is too vague to help an agent understand the tool's behavior beyond the basic function.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness3/5

Is the description appropriately sized, front-loaded, and free of redundancy?

The description is extremely concise - just 5 words. While this avoids waste, it's arguably under-specified rather than appropriately concise. The single phrase 'Vidu Q1 - High-quality text-to-video' is front-loaded but lacks the detail needed for a tool with 3 parameters and no annotations.

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

Completeness2/5

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

Given the complexity of a text-to-video generation tool with 3 parameters, no annotations, no output schema, and low schema description coverage, the description is incomplete. It doesn't address key contextual elements like output format, quality expectations, generation constraints, or how it differs from similar sibling tools in the server.

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

Parameters2/5

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

Schema description coverage is only 33% (only the 'prompt' parameter has a description). The tool description adds no information about parameters beyond what's minimally implied by the name 'vidu_text'. It doesn't explain the purpose of 'duration' or 'aspect_ratio', nor does it provide context about how these parameters affect video generation quality or characteristics.

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 as 'High-quality text-to-video' generation, which is a specific verb+resource combination. However, it doesn't distinguish itself from sibling tools like 'vidu_image', 'kling_master_text', or 'pixverse_text', which likely offer similar text-to-video or text-to-media capabilities.

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 guidance on when to use this tool versus alternatives. With multiple sibling tools offering text-to-video or similar media generation capabilities, there's no indication of what makes 'vidu_text' unique or when it should be preferred over tools like 'kling_master_text', 'pixverse_text', or 'ltx_video'.

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/RamboRogers/fal-image-video-mcp'

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