Skip to main content
Glama

wan_generate_video

Generate AI videos from text prompts using Wan text-to-video, returning task ID and video URLs for creation workflows.

Instructions

Generate AI video from a text prompt using Wan text-to-video model.

This uses the wan2.6-t2v model to create video from text descriptions.
For creating video from images, use wan_generate_video_from_image instead.

Returns:
    Task ID and generated video information including URLs and state.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
seedNoOptional random seed.
sizeNoThe size of the generated video (e.g., '1280x720').
audioNoWhether the generated video should include audio. Default is false.
mediaNoOptional media inputs with a type and URL, supported by wan3.0-video.
modelNoWan model to use. Default: 'wan2.6-t2v'.wan2.6-t2v
ratioNoVideo aspect ratio. Options include 'adaptive', '16:9', and '9:16'.
promptYesDescription of the video to generate. Be descriptive about the scene, motion, style, and mood.
durationNoVideo duration in seconds. Use 2-30, or -1 when supported by the model.
audio_urlNoURL of reference audio to use in the video. Only used when audio is enabled.
watermarkNoWhether to add a watermark. Default is false.
resolutionNoVideo resolution. Options: '480P', '720P' (default), '1080P'.720P
callback_urlNoWebhook callback URL for asynchronous notifications. When provided, the API will call this URL when the video is generated.
prompt_extendNoEnable LLM-based prompt rewriting for better results. Default is false.
negative_promptNoContent to exclude from the video. Maximum 500 characters.

Output Schema

TableJSON Schema
NameRequiredDescriptionDefault
resultYes

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed13 schema fields changedv0.1.20
    • addedInput schema / $defs
      Added value: +{
      +  "MediaItem": {
      +    "description": "A media input for video generation.",
      +    "properties": {
      +      "type": {
      +        "enum": [
      +          "first_frame",
      +          "last_frame",
      +          "reference_image",
      +          "reference_video",
      +          "reference_audio",
      +          "file",
      +          "link"
      +        ],
      +        "title": "Type",
      +        "type": "string"
      +      },
      +      "url": {
      +        "title": "Url",
      +        "type": "string"
      +      }
      +    },
      +    "required": [
      +      "type",
      +      "url"
      +    ],
      +    "title": "MediaItem",
      +    "type": "object"
      +  }
      +}
    • changedInput schema / properties / audio / default
      Previous value: -trueNew value: +false
    • changedInput schema / properties / audio / description
      Previous value: -"Whether the generated video should include audio. Default is true."New value: +"Whether the generated video should include audio. Default is false."
    • changedInput schema / properties / duration / anyOf
      Previous value: -[
      -  {
      -    "enum": [
      -      5,
      -      10,
      -      15
      -    ],
      -    "type": "integer"
      -  },
      -  {
      -    "type": "null"
      -  }
      -]New value: +[
      +  {
      +    "const": -1,
      +    "type": "integer"
      +  },
      +  {
      +    "maximum": 30,
      +    "minimum": 2,
      +    "type": "integer"
      +  },
      +  {
      +    "type": "null"
      +  }
      +]
    • changedInput schema / properties / duration / description
      Previous value: -"Video duration in seconds. Options: 5, 10, or 15. Default depends on model."New value: +"Video duration in seconds. Use 2-30, or -1 when supported by the model."
    • addedInput schema / properties / media
      Added value: +{
      +  "anyOf": [
      +    {
      +      "items": {
      +        "$ref": "#/$defs/MediaItem"
      +      },
      +      "maxItems": 10,
      +      "type": "array"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional media inputs with a type and URL, supported by wan3.0-video.",
      +  "title": "Media"
      +}
    • addedInput schema / properties / model
      Added value: +{
      +  "default": "wan2.6-t2v",
      +  "description": "Wan model to use. Default: 'wan2.6-t2v'.",
      +  "enum": [
      +    "wan2.6-t2v",
      +    "wan2.6-i2v",
      +    "wan2.6-r2v",
      +    "wan2.6-i2v-flash",
      +    "wan3.0-video"
      +  ],
      +  "title": "Model",
      +  "type": "string"
      +}
    • changedInput schema / properties / prompt_extend / default
      Previous value: -trueNew value: +false
    • changedInput schema / properties / prompt_extend / description
      Previous value: -"Enable LLM-based prompt rewriting for better results. Default is true."New value: +"Enable LLM-based prompt rewriting for better results. Default is false."
    • addedInput schema / properties / ratio
      Added value: +{
      +  "anyOf": [
      +    {
      +      "enum": [
      +        "adaptive",
      +        "16:9",
      +        "4:3",
      +        "1:1",
      +        "3:4",
      +        "9:16"
      +      ],
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Video aspect ratio. Options include 'adaptive', '16:9', and '9:16'.",
      +  "title": "Ratio"
      +}
    • addedInput schema / properties / seed
      Added value: +{
      +  "anyOf": [
      +    {
      +      "maximum": 2147483647,
      +      "minimum": 0,
      +      "type": "integer"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional random seed.",
      +  "title": "Seed"
      +}
    • removedInput schema / properties / timeout
      Removed value: -{
      -  "anyOf": [
      -    {
      -      "type": "integer"
      -    },
      -    {
      -      "type": "null"
      -    }
      -  ],
      -  "default": null,
      -  "description": "Timeout in seconds for the API to return data. Default is 1800.",
      -  "title": "Timeout"
      -}
    • addedInput schema / properties / watermark
      Added value: +{
      +  "default": false,
      +  "description": "Whether to add a watermark. Default is false.",
      +  "title": "Watermark",
      +  "type": "boolean"
      +}
  2. Changed4 schema fields changedv0.1.17
    • changedInput schema / properties / audio / default
      Previous value: -falseNew value: +true
    • changedInput schema / properties / audio / description
      Previous value: -"Whether the generated video should include audio. Default is false."New value: +"Whether the generated video should include audio. Default is true."
    • changedInput schema / properties / prompt_extend / default
      Previous value: -falseNew value: +true
    • changedInput schema / properties / prompt_extend / description
      Previous value: -"Enable LLM-based prompt rewriting for better results. Default is false."New value: +"Enable LLM-based prompt rewriting for better results. Default is true."
  3. First observedv0.1.0

TDQS

A3.8/5.0
Behavior3/5

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

No annotations are provided, so the description carries the full behavioral burden. It usefully discloses the asynchronous, task-based nature of the call ('Returns: Task ID ... and state'), which is real context beyond the schema. But it omits permissions/auth requirements, latency expectations, whether generation is billed or rate-limited, and how the task should be polled afterwards.

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?

Two short sentences plus a brief returns note, front-loaded with the core action. Slightly bulky with a header-style 'Returns:' block and a trailing blank line, but nothing is wasted or repeated.

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?

An output schema exists, so return values need not be spelled out, and the alternative tool is named. But for a 14-parameter async generation tool with zero annotations, the description leaves the agent without model-selection guidance, async/polling workflow, or any note about which parameters only apply to certain models (e.g., media and duration=-1).

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?

Schema description coverage is 100%, so every parameter is already documented in the schema, including model enum values, resolution, duration ranges, and media types. The description adds no parameter syntax: it names wan2.6-t2v but never explains which of the five models to choose or what the media inputs require. Baseline 3 applies when the schema does the heavy lifting.

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?

States a specific verb and resource ('Generate AI video from a text prompt') and names the underlying model (wan2.6-t2v), so the agent knows exactly what output to expect. It also explicitly distinguishes itself from the sibling wan_generate_video_from_image, so the tool is identifiable without opening the schema.

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?

Gives a clear routing rule: use this for text-to-video, use wan_generate_video_from_image for image-to-video. That is a genuine when/when-not pair. It does not, however, address the other siblings (wan_generate_video_all_in_one) or explain when to pick among the five selectable models, so guidance is clear but incomplete.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.