Skip to main content
Glama

Generate source video

generate_video
DestructiveIdempotent

Start a paid video-only task with approved quote_id or max_credits. Save the task ID, poll get_video_generation, then retain the video asset ID for previews and exports.

Tool call template

Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.

{
  "id": 1,
  "jsonrpc": "2.0",
  "method": "tools/call",
  "params": {
    "arguments": {
      "request": "<request>",
      "idempotency_key": "<idempotency_key>"
    },
    "name": "generate_video"
  }
}

Input Schema

NameRequiredDescriptionDefault
requestYes
quote_idNo
max_creditsNoApproved per-operation credit cap.
idempotency_keyYesPersist and reuse for this logical video generation.

Output Schema

NameRequiredDescriptionDefault
idYesPersist this task ID immediately after create; poll it instead of creating again.
errorNoTask failure details, independently of any usable outputs.
stageNoCurrent pipeline stage when available.
objectYesPublic task resource type.
statusYessucceeded, failed, and cancelled are terminal; cancelling is not. A failed animation resumes only through an explicitly offered error.details.recovery action.
creditsYesQuoted, reserved, and charged credit states.
outputsNoAvailable assets, including partial outputs on failed/cancelled tasks. Always inspect them at a terminal state.
metadataNoCaller-provided metadata.
progressYesFraction from 0 to 1, not a completion-time estimate.
created_atYesUTC acceptance timestamp.
started_atNoUTC production start when known.
finished_atNoUTC terminal timestamp when known.
resolved_exportNoPersisted FPS sampling summary shared with the quote and manifest; null for legacy tasks.
normalized_inputNoNormalized public input; may contain private prompts or image references. Do not log wholesale.
cancellation_reasonNoStable reason when cancellation is unavailable: TASK_TERMINAL, CANCELLATION_PENDING, CANCELLATION_NOT_CONFIRMED, or GENERATION_ALREADY_SUBMITTED.
cancellation_allowedNoWhether a cancellation request can currently be accepted. Remote cancellation still needs confirmation.

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed6 schema fields changed
    • addedInput schema / $defs / AssetVideoSource
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "asset_id": {
      +      "description": "Owned video asset ID, not a task ID or download URL.",
      +      "format": "uuid",
      +      "title": "Asset Id",
      +      "type": "string",
      +      "x-description-zh": "所属视频资产 ID,不是任务 ID 或下载 URL。"
      +    },
      +    "type": {
      +      "const": "asset",
      +      "title": "Type",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "type",
      +    "asset_id"
      +  ],
      +  "title": "AssetVideoSource",
      +  "type": "object"
      +}
    • addedInput schema / $defs / FileVideoSource
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "file_id": {
      +      "description": "Owned, completed video file ID; upload sessions cannot be used before completion.",
      +      "format": "uuid",
      +      "title": "File Id",
      +      "type": "string",
      +      "x-description-zh": "所属且已完成上传的视频文件 ID;未完成的上传会话不可使用。"
      +    },
      +    "type": {
      +      "const": "file",
      +      "title": "Type",
      +      "type": "string"
      +    }
      +  },
      +  "required": [
      +    "type",
      +    "file_id"
      +  ],
      +  "title": "FileVideoSource",
      +  "type": "object"
      +}
    • changedInput schema / $defs / GenerationInput / properties / first_frame / description
      Previous value: -"Required starting image; use the type discriminator to select an input representation."New value: +"Required image: starting frame in first-frame mode, character reference in reference mode. Use type to select its representation."
    • changedInput schema / $defs / GenerationInput / properties / first_frame / x-description-zh
      Previous value: -"必需首帧,用 type 选择图片传入方式。"New value: +"必需图片:首帧模式下固定首帧,引用模式下提供角色参考。用 type 选择图片传入方式。"
    • addedInput schema / $defs / GenerationInput / properties / reference_video
      Added value: +{
      +  "anyOf": [
      +    {
      +      "$ref": "#/$defs/ReferenceVideoInput"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Optional motion reference. Selects reference_images mode even without additional images; first_frame becomes the character reference, not a fixed starting frame. Mutually exclusive with last_frame.",
      +  "x-description-zh": "可选动作参考;即使没有额外参考图也进入引用模式,此时 first_frame 为角色参考图,不固定首帧。与 last_frame 互斥。"
      +}
    • addedInput schema / $defs / ReferenceVideoInput
      Added value: +{
      +  "additionalProperties": false,
      +  "properties": {
      +    "duration_seconds": {
      +      "description": "Selected duration, 2–5 seconds; the live model may allow less. Rounded half up to 1/24 second; quotes and generation use the same normalized range.",
      +      "maximum": 5,
      +      "minimum": 2,
      +      "title": "Duration Seconds",
      +      "type": "number",
      +      "x-description-zh": "选区时长 2–5 秒,实时模型可能上限更低。四舍五入到 1/24 秒,报价和生成共用规范化选区。"
      +    },
      +    "processing": {
      +      "default": "original",
      +      "description": "original is the default and uses the original clip; opt in to depth for motion/depth conversion, which adds processing time. Processing starts only after generation is submitted.",
      +      "enum": [
      +        "depth",
      +        "original"
      +      ],
      +      "title": "Processing",
      +      "type": "string",
      +      "x-description-zh": "默认 original,使用原画面片段;可主动选择 depth 进行深度转换,这会增加处理时间。仅提交生成后才处理。"
      +    },
      +    "source": {
      +      "description": "Owned uploaded video or existing generated video; sources must share the character image workspace.",
      +      "discriminator": {
      +        "mapping": {
      +          "asset": "#/$defs/AssetVideoSource",
      +          "file": "#/$defs/FileVideoSource"
      +        },
      +        "propertyName": "type"
      +      },
      +      "oneOf": [
      +        {
      +          "$ref": "#/$defs/FileVideoSource"
      +        },
      +        {
      +          "$ref": "#/$defs/AssetVideoSource"
      +        }
      +      ],
      +      "title": "Source",
      +      "x-description-zh": "所属上传视频或已生成视频;需与角色图位于同一工作区。"
      +    },
      +    "start_seconds": {
      +      "default": 0,
      +      "description": "Source start in seconds, rounded half up to the nearest 1/24 second. Independent of the source FPS.",
      +      "maximum": 30,
      +      "minimum": 0,
      +      "title": "Start Seconds",
      +      "type": "number",
      +      "x-description-zh": "来源开始秒数,四舍五入到最近的 1/24 秒;与原视频帧率无关。"
      +    }
      +  },
      +  "required": [
      +    "duration_seconds",
      +    "source"
      +  ],
      +  "title": "ReferenceVideoInput",
      +  "type": "object"
      +}
  2. Changed2 schema fields changed
    • changedOutput schema / properties / status / description
      Previous value: -"succeeded, failed, and cancelled are terminal; cancelling is not terminal."New value: +"succeeded, failed, and cancelled are terminal; cancelling is not. A failed animation resumes only through an explicitly offered error.details.recovery action."
    • changedOutput schema / properties / status / x-description-zh
      Previous value: -"succeeded、failed、cancelled 为终态;cancelling 不是终态。"New value: +"succeeded、failed、cancelled 为终态;cancelling 不是终态。失败动画仅可通过明确提供的 error.details.recovery 操作恢复。"
  3. Changed2 schema fields changed
    • addedOutput schema / properties / cancellation_allowed
      Added value: +{
      +  "default": false,
      +  "description": "Whether a cancellation request can currently be accepted. Remote cancellation still needs confirmation.",
      +  "title": "Cancellation Allowed",
      +  "type": "boolean",
      +  "x-description-zh": "当前是否允许受理取消请求;远端取消仍须确认。"
      +}
    • addedOutput schema / properties / cancellation_reason
      Added value: +{
      +  "anyOf": [
      +    {
      +      "type": "string"
      +    },
      +    {
      +      "type": "null"
      +    }
      +  ],
      +  "default": null,
      +  "description": "Stable reason when cancellation is unavailable: TASK_TERMINAL, CANCELLATION_PENDING, CANCELLATION_NOT_CONFIRMED, or GENERATION_ALREADY_SUBMITTED.",
      +  "title": "Cancellation Reason",
      +  "x-description-zh": "不可取消的稳定原因:TASK_TERMINAL、CANCELLATION_PENDING、CANCELLATION_NOT_CONFIRMED 或 GENERATION_ALREADY_SUBMITTED。"
      +}
  4. Added

TDQS

A4/5.0
Behavior4/5

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

Annotations already declare destructive=true, idempotent=true and openWorld=true, so the bar is lower, yet the description still adds real behavior: the operation is paid (credits are consumed), it is asynchronous (save the task ID, then poll), and the resulting asset ID must be retained for previews and exports. It omits any note on reusing idempotency_key to avoid duplicate charges, which is the main remaining behavioral gap.

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?

Two sentences, front-loaded with the action and its authorization requirement, followed by the lifecycle steps. Every clause carries information and nothing is padded.

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?

With an output schema present the description need not explain return values, and it still helpfully names the task ID and asset ID artifacts. For a high-complexity, paid, asynchronous mutation it covers initiation, polling, and asset retention, though the quote-versus-max-credits choice and idempotency handling remain unexplained.

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 50% and the nested request schema is heavily self-documented, so the baseline is 3. The description clarifies that quote_id must be 'approved' and that max_credits is a per-operation cap, but it adds nothing about the request payload or the idempotency_key parameter.

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 uses a specific verb and resource ('Start a paid video-only task'), and 'video-only' implicitly separates it from the animation siblings. It does not name generate_animation or quote_video_generation explicitly, so an agent must infer the boundary from context rather than from an explicit contrast.

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?

It states a clear precondition for invocation (an approved quote_id or a max_credits cap), which implies quoting precedes generation, and it names the follow-up tool get_video_generation for polling. It stops short of saying when to prefer this over generate_animation or when a quote is mandatory versus optional.

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

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.

Resources